ruzzty06 0 Newbie Poster

i have troubles in accessing dates in ms access with visual basic

the database is contains announcements and it has begindate(SHORTDATE) and enddate(SHORTDATE).

the code

adodcannounce.recordsource="select * from tblannounce where begindate <=' " + date + " ' and enddate >= ' " + date + " ' "

it has an error of TYPE MISMATCH
but when i access the dates individually and compare it with vb date, it has no error.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.