rsInventory.Open "SELECT Expiration_Date FROM YourTable WHERE Expiration_Date < DateValue(Date)", conn, adOpenStatic, adLockOptimistic

what should be the value of that date.
if i put date

rsInventory.Open "SELECT Expiration_Date FROM YourTable WHERE Expiration_Date < Date", conn, adOpenStatic, adLockOptimistic

ive got an error

'no value given value given for one or more required parameters'


can someone help me please?

See your other thread. I have applied there.

rsInventory.Open "SELECT Expiration FROM tblInventory WHERE Expiration < '" & Val(Date) & "'", con, adOpenStatic, adLockOptimistic

i also used that to use the current date :) thanks dude!

Only a pleasure. Please mark this as solved, found at the bottom of this page. Happy coding.:)

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.