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

stLinkCriteria & Query

Status
Not open for further replies.

zipur

Programmer
Jul 5, 2002
13
0
0
CA
I have a form that is pulling records from a table and sending them to a report. All works fine.

BUT

I want to select records between #date1# and #date2# no problem... I wrote the sql like this

stLinkCriteria = LDateOut>=#01/01/2002 AND LDateOut<=#08/30/2002# ...

Unless I use the LDateOut field in my MS Query linked to the form I get a window popping up prompting me for a definition of LDateOut.

If I define LDateOut in my (MS Query linked to the Form), it groups by date so if there are results spanning 100 days I get 100 summaries.

What is the propper way to use Where clauses sent from the VBA, to the (Report using a MS Query) if the MSQuery does not use the field in the VBA Where clause?

Make sense?
 
Never Mind...

I created a new report which groups by customer and then I removed the detail area of the form and used the group summary. Gave the desired result... if there is another way to do this, let me know please.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top