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

syntax for a creteria based on a 'date' 1

Status
Not open for further replies.

jamaarneen

Programmer
Dec 27, 2007
213
BE
Hi,
In a DCount function, i want to use a 'date' value in the creteria.
a date is filled in a textbox (which's format is General Date, and the function should search if this akready exists in the table. the field where the creteria is looking, is date format.
but it didn't find nothing. I can't figure out why.

this is my syntax for the creteria:
Code:
"ReqDel_Date =  #" & Me!txt_ReqDel_Date& "#"
I tried also without the ' # ' character.
please help. thanks.
 
ReqDel_Date=#" & Format(Me!txt_ReqDel_Date, "yyyy-mm-dd") & "#"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 

Yes! it helped!!!
Thanks PHV

Well, although I'm happy that i got it working, I'm VERY curious: WHY? what is the format doing to the textbox.value, that is already formatted as a general date
 
The date is formatted in a non ambiguous way.
e.g.:
2009-02-09 is clearly 9 Feb 2009
but what about 09/02/2009 ?
for european countries it's the same as above but for US it's 2 Sep 2009 and JetSQL is an all american product ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top