hi....this website has got me going...i need help with the syntax of the following SQL in vb....cant seem to get the date into the SQL properly. Please help....thanks!!! Need to find age older than certain date!!
the SQL syntax for Date ?
Dim dSearch AS date
dSearch = InputBox$("Enter date to show employees older than","QUERY")
Data1.recordsource = "SELECT * FROM StaffDetails WHERE StaffDetails.[Date-of-Birth] <= " &dSearch
I thought about not putting the speech marks after dSearch as it is a date and not string....any suggestions??? Many thanks


Reply With Quote