R
Robin
What's the best way to do the following?
If users keys in "smith" for for it will display
all "smith" record and I want to have a button on this
form that will print a report for the one selected.
I tried to to create link criteria, but I've got something
wrong. Here's the code. Can someone tell me if there's a
better way and/or what I'm doing wrong???
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "rptByLName"
stLinkCriteria = [LName] = Me![LName]
DoCmd.OpenReport stDocName, acPriview, , stLinkCriteria
If users keys in "smith" for for it will display
all "smith" record and I want to have a button on this
form that will print a report for the one selected.
I tried to to create link criteria, but I've got something
wrong. Here's the code. Can someone tell me if there's a
better way and/or what I'm doing wrong???
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "rptByLName"
stLinkCriteria = [LName] = Me![LName]
DoCmd.OpenReport stDocName, acPriview, , stLinkCriteria