filtering a subform in main from a popup form

tanzania

Registered User.
Local time
Today, 05:03
Joined
Oct 20, 2006
Messages
91
Hi, I have a main form which has a button that brings up a small pop up form to enter dates from and to. I then want the subform on the main to be filtered according to these dates. So far I have, where sfcurrent is the sub, and Date_game a control on the subform.

Const conDateFormat = "\#mm\/dd\/yyyy\#"
Forms!frmMain!sfCurrent.Form.Filter = "Date_game" & " Between " & Format(Me.txtDateFrom, conDateFormat) _
& " And " & Format(Me.txtDateTo, conDateFormat)
Forms!frmMain!sfCurrent.Form.FilterOn = True
Forms!frmMain!sfCurrent.Requery

Im getting a syntax error, or object not recognised...can anyone offer any suggestions? thanks!
 

Users who are viewing this thread

Back
Top Bottom