P
PR
I want to be able to print a membership record from a form...
I have a form with details of a member on it... I want to print a report
from this form with membership details on it...
I have the report and it works... I have the form and it works...
When I go to print the form using a button... it defaults to the first
record...
Below is the code I am using on the button... but the focus does not stay
with the current record...
Private Sub cmdPrintMembershipCardW_Click()
On Error GoTo Err_cmdPrintMembershipCardW_Click
Dim stFilter As String
stDocName = "PK_MembershipNo = " & Me.PK_MembershipNo
' Save record to allow it to be read for the report
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "rpt_membership_card_W", acPreview
Exit_cmdPrintMembershipCardW_Click:
Exit Sub
Err_cmdPrintMembershipCardW_Click:
MsgBox Err.Description
Resume Exit_cmdPrintMembershipCardW_Click
End Sub
Can anyone help...
I have a form with details of a member on it... I want to print a report
from this form with membership details on it...
I have the report and it works... I have the form and it works...
When I go to print the form using a button... it defaults to the first
record...
Below is the code I am using on the button... but the focus does not stay
with the current record...
Private Sub cmdPrintMembershipCardW_Click()
On Error GoTo Err_cmdPrintMembershipCardW_Click
Dim stFilter As String
stDocName = "PK_MembershipNo = " & Me.PK_MembershipNo
' Save record to allow it to be read for the report
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "rpt_membership_card_W", acPreview
Exit_cmdPrintMembershipCardW_Click:
Exit Sub
Err_cmdPrintMembershipCardW_Click:
MsgBox Err.Description
Resume Exit_cmdPrintMembershipCardW_Click
End Sub
Can anyone help...