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

type mismatch error when date in 4/01/2007 and 4/31/2007

P: 1
Hi to everyon
i have a problem plz help
me
when i filter a recordset by date in vb and ms access
and enter the any date of month 04/2007 i get the error msg
as type mismatch
but i works for rest of all the months of 2007
Apr 7 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 5K+
P: 8,434
Hi to everyon
i have a problem plz help
me
when i filter a recordset by date in vb and ms access
and enter the any date of month 04/2007 i get the error msg
as type mismatch
but i works for rest of all the months of 2007
Can you show us the code you're using? And what version of VB is this?

(Don't forget, in SQL you generally have to specify dates in U.S. format - that is, m/d/y.)
Apr 8 '07 #2

iburyak
Expert 100+
P: 1,017
Partial date is not recognized.

Use following :


[PHP]Month(datecolumn) = 4
Year(datecolumn) = 2007[/PHP]

Good Luck.
Apr 8 '07 #3

Expert 5K+
P: 8,434
Partial date is not recognized.
The OP did not indicate they are entering partial dates. If that were the case, it wouldn't work for the other months either.
Apr 9 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.