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

Once SQL Activated I cant use Criteria Fields in Querry

Status
Not open for further replies.

Sadukar

Technical User
Feb 19, 2003
159
IE
Hi all,

I have a query that pulls information from 3 Tables.
SQL Select, From, Union etc...

I had a similar query which pulled info from only one table and in the criteria field I could to select a report between two dates. EG Between [Start Date] and [End Date]

How Can I do this now that I have joined 3 similar tables through SQL?

Any ideas would be appreciated.
Thanks
S.
 
Sadukar,
I have done this by opening the form in design view and in the control source, where the SQL is listed, click on the "..." on the right side. That lists the SQL by a QBE grid. I then just add the appropriate entries to the crieteria field. It is, of course, then transposed back to the SQL.
It really saves writting all of the code.
jim
 
I would suggest creating a criteria form that would allow the user to enter the two dates (the From date and the To date). Then I would place criteria in all three queries you are joining to refer back to the form (Between [Forms]![frmEnterDates]![txtFrom] And [Forms]![frmEnterDates]![txtTo])

Let me know if this helps.

BAKEMAN [pimp]
 
As long as the criteria statement is absolutely identical between the three tables ACCESS will only prompt once for each date entry.

Between [Beginning Date] and [Ending Date]

Put the above criteria statement in the date field column in all three tables. ACCESS will only prompt once for the Beginning Date and once for the Ending Date. Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top