I am using Access 2007 AND Adodc. [Date] is a field in my table1.What is the code for getting a record on a particular date?

Recommended Answers

All 2 Replies

Make a select query with a WHERE clause pointing to the date. In the code below I assume your Adodc object's name is Adodc1

Adodc1.CommandType = adCmdText
Adodc1.Rcourdsource = "SELECT * FROM table1 WHERE Date = #" + yourdate + "#"
Adodc1.Refresh

Note that the # sign tells the database that you are sending a date and "yourdate" is a variable containing the date to be selected.

Thanks! the problem is solved

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.