filtering a split form to show only records that are not completed (1 Viewer)

fearmichaele

Registered User.
Local time
Today, 08:09
Joined
Jan 14, 2014
Messages
34
I need help please? my brain hurts. i am trying to create a button on a split form/datasheet. I have a field named completed that is a yes/no field. if the job is completed then the field is yes, .... i want to use a button on the form that will filter the data on the datasheet view to show only the records that the completed field is no. then click the same button to return the view to all records.

i am trying to use VBA and the on_click function.

the code i have tried is as follows

Private Sub filtertoggle_Click()
If filtertoggle Then
Me.Filter = "completed_and_returned_to_MIRT_SPS is No"
Me.FilterOn = True
Else
Me.Filter = Replace(Me.Filter, "completed_and_returned_to_MIRT_SPS is false", vbNullString)
Me.FilterOn = False
End If

End Sub


i just cant get it to show only the records that are not completed and return to original view after a second button click.

any help would be greatly appreciated. :banghead:
 

Users who are viewing this thread

Top Bottom