B
Brewtzaff
Hi,
I'm trying to printout a report out of a form, but everytime I try to
print only the shown record, MSA opens a popup window asking me to
enter the ID, (which should be the primary key). Whatever I put in,
except 1 shows the report with an #error. But if I put in 1, all the
records are shown on the report (one/report)
Here's my code, so can someone help me please:
Private Sub CarteMembre_Click()
On Error GoTo Err_CarteMembre_Click
Dim stDocName As String
Dim strWhere As String
stDocName = "lbCartes"
strWhere = "ID= " & Me!ID
DoCmd.OpenReport stDocName, acPreview, , strWhere
Exit_CarteMembre_Click:
Exit Sub
Err_CarteMembre_Click:
MsgBox Err.Description
Resume Exit_CarteMembre_Click
End Sub
I googled a lot, but none of the answers found could resolve my
problem.
Cheers
brewtzaff
I'm trying to printout a report out of a form, but everytime I try to
print only the shown record, MSA opens a popup window asking me to
enter the ID, (which should be the primary key). Whatever I put in,
except 1 shows the report with an #error. But if I put in 1, all the
records are shown on the report (one/report)
Here's my code, so can someone help me please:
Private Sub CarteMembre_Click()
On Error GoTo Err_CarteMembre_Click
Dim stDocName As String
Dim strWhere As String
stDocName = "lbCartes"
strWhere = "ID= " & Me!ID
DoCmd.OpenReport stDocName, acPreview, , strWhere
Exit_CarteMembre_Click:
Exit Sub
Err_CarteMembre_Click:
MsgBox Err.Description
Resume Exit_CarteMembre_Click
End Sub
I googled a lot, but none of the answers found could resolve my
problem.
Cheers
brewtzaff