Ok this is my scenario: I have a form with a subform, in msAccess2013 this subform has a table and I want to filter the rows using a list in a combobox, so that the subform presents me the records depending of the selection of that combo box, The combo box data type is meant to be Date, it is also a cascade combobox (it will show data regardless of another combobox) so at the end I will filter the records that only has that specific date in the subform table.
OK this is the code that I have:
Private Sub cbSelectDate_AfterUpdate()
Dim AT As Date
AT = "select * from subform where ([AppointDate] = # & Me.cbSelectDate & "#')"
Me.subform.Form.RecordSource = AT
Me.subform.Form.Requery
End Sub
vb doesn't completely accept my code It says "Compile error: Expected: end of statement" Please Help??
Option Strict On
that code shouldn't even compile... – zaggler