I need some help getting this search macro to work when the form is moved into my navigation form. the form by itself works flawlessly, but I cant seem to get the code to work once moved into the navigation form.
In the "On Click" event for the search button I have an embedded Marco with the following:
ApplyFilter
Filter Name (blank)
Where Condition = [Offender Name] Like "*" & [Forms]![Form: Search]![Text12] & "*" Or [Notes History] Like "*" & [Forms]![Form: Search]![Text12] & "*"
Control Name (blank)
My navigation form is named [Form: Main Menu]
The navigation subform name was not changed so is still [NavigationSubform]
I have tried to update the code to reflect the form being moved into the navigation form but with no luck. Here are some options I tried based on some internet searching, again no luck getting this to work.
[Offender Name] Like "*" & [Forms]![Form: Main Menu]![NavigationSubform]![Form: Search]![Text12] & "*" Or [Notes History] Like "*" & [Forms]![Form: Main Menu]![NavigationSubform]![Form: Search]![Text12] & "*"
[Offender Name] Like "*" & [Forms]![Form: Main Menu]![NavigationSubform].[Form]![Text12] & "*" Or [Notes History] Like "*" & [Forms]![Form: Main Menu]![NavigationSubform].[Form]![Text12] & "*"
Where am I going wrong? Should I not be using a macro within the navigation form? If not could someone provide me with the VBA code I should use? Thanks in advance for any input that is offered. sorry for the noobish question.
Cheers,
Niko