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

Filter 2 unbound Textboxes

Status
Not open for further replies.

nim180

IS-IT--Management
Aug 11, 2005
161
AU
Hello Everyone, I have the following problem which im hoping someone can help me with. I have 2 unbound Textboxes and a filter button on a form. In Textbox1 the user inputs a start date and in Textbox2 the user inputs an end date, when the filter button is clicked it should populate a report with all the customers between and equal the 2 dates entered. The report is linked to a query, within that query i have the field dates and in the criteria of that i have the following code:

Between "&[Forms]![frmForReportOnTravel]![startdate]&" And "&[Forms]![frmForReportOnTravel]![enddate]&"

I thought the following code would do what i wanted but it doesnt actually filter all the results it only brings up 1 or 2 of the results and sometimes none when there should be. Any suggestions would be great.

Thank,
Nim
 
How are ya nim180 . . .

If what you shown is the actual SQL from the query, then it should be:
Code:
[blue]Between [Forms]![frmForReportOnTravel]![startdate] And [Forms]![frmForReportOnTravel]![enddate][/blue]


Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Hey aceman thanks for the response, i orginally had:

Between [Forms]![frmForReportOnTravel]![startdate] And [Forms]![frmForReportOnTravel]![enddate]

but changed it to

Between "&[Forms]![frmForReportOnTravel]![startdate]&" And "&[Forms]![frmForReportOnTravel]![enddate]&"

i have decided to scrap this method i try another approach, thanks for the reply.

Nim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top