Laura Mustto
New member
- Local time
- Today, 01:25
- Joined
- Jul 17, 2012
- Messages
- 8
Hello again guys, this must be a very newbie question but I managed to make this code to print a record in a new form, at the current record. I'm proud because it worked! But there's a little problem, if you finally don't print (click 'cancel') it returns an error. How to avoid it?
Code:
Dim strDocName As String
Dim strWhere As String
strDocName = "frmPrint"
strWhere = "[P]=" & Me!P
DoCmd.OpenForm strDocName, acNormal, , strWhere
DoCmd.PrintOut acSelection
DoCmd.Close acForm, "frmprint"
Last edited: