G
Guest
Hi all,
I had a macro for searching records placed on "OnOpen" event of my form
"ContactPersons".
But this was inconvenient, so i wanted to include the code of that macro
into the script of the button on MAIN form which opens the form
"ContactPersons".
The script below DOES open the form, DOES show the pop-up window with the
words "Enter the Person's Name", but it DOES NOT return any results - only
empy form.
What can be wrong here??? PLEASE HELP!
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ContactPersons"
stLinkCriteria = "[stContactPersons]![ClientName] Like (' * ' + [Enter
the Person's Name] + ' * ')"
DoCmd.OpenForm stDocName, , , stLinkCriteria
I had a macro for searching records placed on "OnOpen" event of my form
"ContactPersons".
But this was inconvenient, so i wanted to include the code of that macro
into the script of the button on MAIN form which opens the form
"ContactPersons".
The script below DOES open the form, DOES show the pop-up window with the
words "Enter the Person's Name", but it DOES NOT return any results - only
empy form.
What can be wrong here??? PLEASE HELP!
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ContactPersons"
stLinkCriteria = "[stContactPersons]![ClientName] Like (' * ' + [Enter
the Person's Name] + ' * ')"
DoCmd.OpenForm stDocName, , , stLinkCriteria