filter

  • Thread starter Thread starter Bill H.
  • Start date Start date
B

Bill H.

I have a command button on a form that sets a value in the form's where
value, but the records are not filtered. What else do I need to do?

Thx.
 
Set the FilterOn property as well.

Example:
Dim strWhere As String

If Me.Dirty Then 'Save any edits first.
Me.Dirty = False
End If

strWhere = "PhotoId = [999]"
Me.Filter = strWhere
Me.FilterOn = True

If the line that sets FilterOn results in an error about "canceled the
previous operation", it means your filter string is mal-formed.
 
Back
Top