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

Inputting text box information into Query criteria

Status
Not open for further replies.

chanman525

IS-IT--Management
Oct 7, 2003
169
US
Just a quick question. I have a calendar control on a form and two text boxes. When you click on a text box and then click a date on the calendar, the date is inputted into the text box.

I have a query that I'm trying to run off of these two dates in the text boxes but I can't seem to figure out how to use them properly.

In my query criteria I have it as

Between [frmMain]![txtstartdate] And [frmMain]![txtenddate]

Whenever I hit the command button to run the query, a blank box pops up that says txtstartdate.

Can anyone help out with the correct criteria to make my query work?
 
Have you double-checked that the name of the textbox on the open form is exactly txtstartdate?
 
Perhaps this ?
Between [Forms]![frmMain]![txtstartdate] And [Forms]![frmMain]![txtenddate]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Please ignore my last post. You need Forms!

Between Forms![frmMain]![txtstartdate] And Forms![frmMain]![txtenddate]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top