2 questions :
- what is DMax() ?
- what doesn't work ? (do you have an error, no row returned, ...) Water is not bad as long as it stays out human body ;-)
Try doing something like this to receive all the employee after a certain date:
Code:
Dim myDate
myDate = "6/1/2002"
set rs = my_conn.Execute ("Select names from tblemployee where Date_employed > '"&myDate&"'")
The above SQL will work for most databases, if your using ms access than you need to surround your date in #s instead of single quotes like so:
Code:
set rs = my_conn.Execute ("Select names from tblemployee where Date_employed > #"&myDate&"#")
An SQL statement is a string like any other string variable before you send it to the database. This means you can concatenate in new values and the results of functions exactly like you would with any other string.
-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
For my next trick I will pull a hat out of a rabbit (if you think thats bad you should see how the pigeon feels...)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.