I have created a report that looks kind of like a spreadsheet where there are rows and columns of information. For some fields, I am using DCount and others I am using DSum to pull the correct information ouf of a table.
An example of the DCount expression:
=DCount("[InvoiceDate]","ClientTracking","[AccountRep]='John' AND [InvoiceDate]>=#1-1-2003# AND [InvoiceDate]<=#1-31-2003#")
An Example of the DSum expression:
=Nz(DSum("[TER]","ClientTracking","[AccountRep]='John' AND [InvoiceDate]>=#1-1-2003# AND [InvoiceDate]<=#1-28-2003#"),0)
With these hard coded on the report, everything works fine.
What I would like to do is either use a listbox off a switchboard to select the AccountRep or at a minimum, be prompted to enter that into a prompt box.
Secondly, I would like to know if it is possible to change the date parameters to automatically pick up the current year rather than having the "-2003#" hardcoded in the expression.
Anyone?
TIA -
R. Fisher
An example of the DCount expression:
=DCount("[InvoiceDate]","ClientTracking","[AccountRep]='John' AND [InvoiceDate]>=#1-1-2003# AND [InvoiceDate]<=#1-31-2003#")
An Example of the DSum expression:
=Nz(DSum("[TER]","ClientTracking","[AccountRep]='John' AND [InvoiceDate]>=#1-1-2003# AND [InvoiceDate]<=#1-28-2003#"),0)
With these hard coded on the report, everything works fine.
What I would like to do is either use a listbox off a switchboard to select the AccountRep or at a minimum, be prompted to enter that into a prompt box.
Secondly, I would like to know if it is possible to change the date parameters to automatically pick up the current year rather than having the "-2003#" hardcoded in the expression.
Anyone?
TIA -
R. Fisher