load specific report from form

tubar

Registered User.
Local time
Today, 15:16
Joined
Jul 13, 2006
Messages
190
I have a form whos control source is BULB MASTER TABLE. When I am viewing a specific bulb I want to hit a button and view a report on the that same specific bulb. The reports control source is also THE BULB MASTER TABLE. Heres the code im using on the form button to load the report…the problem I am having is all the lamps are loading in the report and not the specific lamp

Private Sub Command137_Click()
On Error GoTo Err_Command137_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "bulb spec"

stLinkCriteria = "[ID]=" & Me![Text91]
DoCmd.OpenReport stDocName, acPreview
Exit_Command137_Click:
Exit Sub

Err_Command137_Click:
MsgBox Err.DESCRIPTION
Resume Exit_Command137_Click

End Sub

Is the code the issue or something else
 
never mind all worked wonderful!!!! thanks
 
Last edited:

Users who are viewing this thread

Back
Top Bottom