Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reports

Status
Not open for further replies.

iman1

Programmer
Aug 20, 2004
11
OM
How can I view information in the reports according to the period of time determind by the user?
 
One way is to play with the 4th argument (WhereCondition) of the DoCmd.OpenReport method:
strStartDate = "#" & Format(Me![Name of start date control], "m/dd/yyyy") & "#"
strEndDate = "#" & Format(Me![Name of end date control], "m/dd/yyyy") & "#"
strCriteria = "[Name of date field] Between " & strStartDate & " And " & strEndDate
DoCmd.OpenReport "Name of report", acViewPreview, , strCriteria

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Mr.PH
I'm very thankful for your help , what you wrote was very
helpful and it worked out.

But,if you can just help me in finding a way to get the total of numbers which appear in specific field in the report.
I tried to use :
=sum([Name of the field])
but it didn't work.
 
but it didn't work
Any error message ? Unexpected behaviour ?
Is the formula you posted the ControlSource of a TextBox in a footer section ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thank you for help, but there is another thing:
How can I display information in the report depend on the period of time and the name entered at the same time by the user ?
I will be very grateful if you help me in that also.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top