Mansoor Ahmad
Registered User.
- Local time
- Today, 23:00
- Joined
- Jan 20, 2003
- Messages
- 140
Dear All
On a form I have a command button that on click opens a report, based on the selection made in a combo box on the same form.
I have used following code. It does open the report but does not show any data. Can somebody advice please.
Private Sub CmdVin_Click()
Dim stDocName As String
Dim vinno As String
vinno = "Forms![New form Sample]!Combo100"
stDocName = "R_VIN nos summary"
DoCmd.OpenReport stDocName, acPreview, , "[CUSTOMER] = '" & vinno & "'"
End Sub
Thanks
On a form I have a command button that on click opens a report, based on the selection made in a combo box on the same form.
I have used following code. It does open the report but does not show any data. Can somebody advice please.
Private Sub CmdVin_Click()
Dim stDocName As String
Dim vinno As String
vinno = "Forms![New form Sample]!Combo100"
stDocName = "R_VIN nos summary"
DoCmd.OpenReport stDocName, acPreview, , "[CUSTOMER] = '" & vinno & "'"
End Sub
Thanks