Skiddon
02-08-2010, 06:26 AM
I am trying to print one single record to a report that I have already created. When I click the button on the form nothing happens. Here is the code I am using. Someone Help!!!
Private Sub Print_Packet_Click()
If Me.Dirty Then 'Save any edits.
Me.Dirty=False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "There is no data for this record. Please select another record."
Else
DoCmd.OpenReport "Report", acViewPreview, , "ID='" & Me.ID & "'"
End If
End Sub
Private Sub Print_Packet_Click()
If Me.Dirty Then 'Save any edits.
Me.Dirty=False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "There is no data for this record. Please select another record."
Else
DoCmd.OpenReport "Report", acViewPreview, , "ID='" & Me.ID & "'"
End If
End Sub