passing date value from calendar to a table through a query
I am using a calendar and a table in a subform (ms access 2003). Table has a field called "Game date" which is set to =date() [current date]. When i click a date in the calendar i want the table in the form filtered with the selected date in the calendar. i tried the following code but does not work. i am able to take the value to a text box. can anyone help me please?
Private Sub UnoCalendar_Click()
Dim dt As Date
dt = Me.UnoCalendar.Value
strsql = "SELECT * FROM UNO WHERE [GameDay] = " & dt
Me.FormUno.Form.RecordSource = strsql
GameDay is the date field in the table (UNO) ."FormUno" is the name of the subform
Re: passing date value from calendar to a table through a query
It should work, yo might be missing something.
Can you attach your database file here?
|All times are GMT +5.5. The time now is 03:15.|