S
Sport
I have found an example for filtering on a form, but I am not sure why the
double quotes were used. Can some on fill in this blank for me?
Take a Products form with a ProductCategory field. With an unbound combo in
the form's header, you could provide a simple interface to filter products
from one category. The combo would have these properties:
Name cboShowCat
ControlSource ' Leave blank.
RowSource tblProductCategory 'Your look up table.
AfterUpdate [Event Procedure]
Now when the user selects any category in this combo, its AfterUpdate event
procedure filters the form like this:
Private Sub cboShowCat_AfterUpdate()
If IsNull(Me.cboShowCat) Then
Me.FilterOn = False
Else
Me.Filter = "ProductCatID = """ & Me.cboShowCat & """"
Me.FilterOn = True
End If
End Sub
double quotes were used. Can some on fill in this blank for me?
Take a Products form with a ProductCategory field. With an unbound combo in
the form's header, you could provide a simple interface to filter products
from one category. The combo would have these properties:
Name cboShowCat
ControlSource ' Leave blank.
RowSource tblProductCategory 'Your look up table.
AfterUpdate [Event Procedure]
Now when the user selects any category in this combo, its AfterUpdate event
procedure filters the form like this:
Private Sub cboShowCat_AfterUpdate()
If IsNull(Me.cboShowCat) Then
Me.FilterOn = False
Else
Me.Filter = "ProductCatID = """ & Me.cboShowCat & """"
Me.FilterOn = True
End If
End Sub