Hi
Im using a button to print a report based on a text box values on the form.
the code for which is below
The problem that I am getting is not only is the label printing but so is the form.
Any ideas why this would be?
Im using a button to print a report based on a text box values on the form.
the code for which is below
Code:
Private Sub SaveBtn_Click()
DoCmd.SetWarnings False
DoCmd.RunSQL "Update BookInTable SET DateBookedOut = '" & Me!DateTxt & "' WHERE BarCode ='" & Me![BarTxt] & "'"
DoCmd.RunSQL "Update BookInTable SET BookedOut = True WHERE BarCode ='" & Me![BarTxt] & "'"
DoCmd.OpenReport "Labels", acViewNormal
DoCmd.PrintOut , , , , 1
DoCmd.Close acReport, "Labels", acSaveNo
DoCmd.SetWarnings True
End Sub
The problem that I am getting is not only is the label printing but so is the form.
Any ideas why this would be?