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!

unbound value list as criteria in a query

Status
Not open for further replies.

woodje

Technical User
May 24, 2004
16
US
Hello,

I have an unbound form with a value list that is displaying values of (YYYY-MM) for all of 2005. When you press the cmd button it is calling a query that is using this value list to drive its criteria. However the query is bringing back no data. When I remove the form and field criteria and hard code the value. When I type 2005-02 the query tool changes it to 2005-2 this returns no data. If I type the data as "2005-02" then I get the selected records. How can I have the query bring back these records using the form and field selection? I have tried using the "" in the query criteria. That has not worked. I have tried to add the "" information on the value list values. Any help you can give me will be great. Thanks
 
You need to surround the dates in queries by #
eg. #01-01-2005#

Ian Mayor (UK)


Program Error
Programmers do it one finger at a time!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top