F
Fred
Experienced on Access, very very very newbie on code.
In order to learn (step 1 of 100 of figuring out Allen Browne's multi-field
form filter example) trying to do the most basic example of setting a filter
criteria; filter for exact match between user input into an unbound text box
and a field "field1"
Just to start somewhere:
Made an unbound text box named Field1InputTextBox
Made an button named "ButtonToLaunchFilter"
Put code for "on Click" event of the button as follows:
(this is the code for the entire form)
Option Compare Database
Private Sub ButtonToLaunchFilter_Click()
Me.Filter = "[Field1] = Me.Field1InputTextBox"
Me.FilterOn = True
End Sub
Did I do anything right?
What should I change / add to make it work?
Any help would be appreciated
In order to learn (step 1 of 100 of figuring out Allen Browne's multi-field
form filter example) trying to do the most basic example of setting a filter
criteria; filter for exact match between user input into an unbound text box
and a field "field1"
Just to start somewhere:
Made an unbound text box named Field1InputTextBox
Made an button named "ButtonToLaunchFilter"
Put code for "on Click" event of the button as follows:
(this is the code for the entire form)
Option Compare Database
Private Sub ButtonToLaunchFilter_Click()
Me.Filter = "[Field1] = Me.Field1InputTextBox"
Me.FilterOn = True
End Sub
Did I do anything right?
What should I change / add to make it work?
Any help would be appreciated