If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
DLookup in Query
I have a report showing totals for each account for the month. I am trying
to add a textbox for each account that shows the totals for the prior month. Below is what I last tried and I can't find the right syntax. 200901TransactionsTotalsQuery is a Totals query, that's why I used DLookup instead of DSUM. can someone help? =DLookUp("[AccountTotals]","200901TransactionsTotalsQuery","[TranAccount] =[TranAccount]") |
#2
|
|||
|
|||
DLookup in Query
gator wrote:
I have a report showing totals for each account for the month. I am trying to add a textbox for each account that shows the totals for the prior month. Below is what I last tried and I can't find the right syntax. 200901TransactionsTotalsQuery is a Totals query, that's why I used DLookup instead of DSUM. can someone help? =DLookUp("[AccountTotals]","200901TransactionsTotalsQuery","[TranAccount] =[TranAccount]") If TranAccount is a numeric type field: =DLookUp("[AccountTotals]","200901TransactionsTotalsQuery","[TranAccount] = " & [TranAccount") If it's a Text field: =DLookUp("[AccountTotals]","200901TransactionsTotalsQuery","[TranAccount] = """ & [TranAccount"""") It seems like using a subreport based on the 200901TransactionsTotalsQuery query would be easier/faster. -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|