Oops... that should read
Me.sfrEvents.SourceObject = "SELECT * FROM tblEvents WHERE [dtmEventHeld] = #" & dtmDate & "#"
Where dtmDate is a date that is compiled when you click a specific button (e.g. cmdDate) on the main form. For example, if you click the "1" button on the mainform then you'd have to figure out which month, day, and year you're talking about and then assign it to the date dtmDate using the DateSerial function.
Dim dtmDate as Date
dtmDate = DateSerial(YYYY, MM, DD)
YYYY, MM, DD are the parts of the date you "collected" when you clicked that button. If the button said "1", then DD = 1. I don't know enough about what your form looks like to guess how you express what date you're sitting on.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|