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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you 1

Status
Not open for further replies.

cell0042

Programmer
Nov 5, 2002
16
US
If you want to be able to click on anyday in a calendar and have it show you the report for that day what do I need to do. I made a form that has the calendar. I created a button to preview the report for that day but its showing me all the days. Is there a macro needed to perform this?
 
You need to use a query.

see the northwinds solutions database employee sales. See also

thread702-362099

ope this helps
Rob!
 
In the query that is the basis for the report, in the date field, in the criteria section, place:

="#" & Forms![name of form with calendar]![name of calendar control] & "#" Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! [thumbsup2]

Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
In your form when opening the report using
DoCmd.OpenReport there is an optional wherecondition argument. (look up OpenReport in help)

You could put something like "[date]=#" & mydatecontrol & "#"

The advantage of that over putting the form reference in the reports query is that you have the ability to use the same report with other forms and different criteria.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top