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!

Using text box data from form in query.

Status
Not open for further replies.

lvengineer

Technical User
May 19, 2003
9
US
Hello Programmers,
I have been working on this last problem for my database for some time. There have been many helpful posts but I am missing a concept I believe.
My database main form has txtStartDate and txtEndDate text boxes. It also has a command button to run a query and preview a report. My query calls the text boxes dates input in the Date critera but instead of using the user entered dates on the form, it produces "pop boxes" asking start and end dates.
SQL for query is:
SELECT [Exception Data Entry Table].Employee, Sum([Exception Data Entry Table].Credit) AS SumOfCredit
FROM [Exception Data Entry Table]
WHERE ((([Exception Data Entry Table].Date) Between [Forms]![frmGroup Report Form]![txtStartDate] And [Forms]![frmGroup Report Form]![txtEndDate]))
GROUP BY [Exception Data Entry Table].Employee;
How do I use the dates entered on the form i.e. "attach" them to the query and search the table records between those dates instead of getting the pop up forms asking for the dates.
Thanks for any help,

lvengineer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top