Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report not linking criteria on print

Status
Not open for further replies.

belovedcej

Programmer
Nov 16, 2005
358
US
This is odd. The following code works perfectly. But as soon as I change acViewPreview to acViewNormal, the report prints every record instead of just the linked one. Any ideas?

Code:
Dim stLinkCriteria As String
stLinkCriteria = "[Phone_Message_ID] = " & Me.txtPhoneMessageID
DoCmd.OpenReport "rptPhoneMessages", acViewPreview, , stLinkCriteria
 
I figured it out. instead of txtPhoneMessageID (the name fo the control) I did Phone_Message_ID (the name in the db). That worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top