By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,473 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Access

P: n/a
i created a table in Access 7.0 which contains a datetime field. when i
tried to write a querry in visual basic to compare this datetime field
with another date variable like select passportno from AppliedVisa
where ReceiveDate = " & curdate & " and status = " & "'" & "No" & "'"
its not working.why

Mar 20 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
1. You need to delimit the date with #. If your regional settings are not
m/d/y, you also need to format the field.

2. Presumably Status is a yes/no field, so the value will be True/False
rather than the text "Yes" or "No".

Try:
"WHERE (ReceiveDate = #" & Format(curdate, "mm/dd/yyyy") & "#) AND
(status = False)"

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Binu" <bi*********@gmail.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
i created a table in Access 7.0 which contains a datetime field. when i
tried to write a querry in visual basic to compare this datetime field
with another date variable like select passportno from AppliedVisa
where ReceiveDate = " & curdate & " and status = " & "'" & "No" & "'"
its not working.why

Mar 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.