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

Problem passing values to Query

Status
Not open for further replies.
Mar 4, 2001
43
US
I have a form with two DTpicker controls. The user will use these to select a start and end date for a query, then click a button and presto! ...up comes the report for that time period. However due to some stuff we do with the timestamps on the records I need to take the date entered and adjust it for the user to get results that actually reflect the timeframe they're querying for. So in my query's criteria field I have:

Between (DateValue([Forms]![Interface]![startdate])-0.00069)
And (DateValue([Forms]![Interface]![enddate])+1.00069)

However when i try to run the query with this criteria I get a "OBDC call - Failed" message. If I remove the values after the dates it runs. Does anyone know why, and if so how do I make it work?
 
Between #" & DateValue([Forms]![Interface]![startdate])-0.00069 & "# And #" & DateValue([Forms]![Interface]![enddate])+1.00069 & "#"

Aivars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top