Update form to new record while printing report.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I enter information on an Orders form. When finished, I print it. While it's
printing. I would like the Orders form to update to a new (blank) record.
Below is the "On Click" code I'm using on the print command button:
Private Sub Command142_Click()
'Save the record
DoCmd.RunCommand acCmdSaveRecord
'Open the report to just the record shown on the form
DoCmd.OpenReport "Order Details", acViewNormal, , "[OrderID]=" & [OrderID]
End Sub
I'm sure there is a simple answer to this, but I haven't been able to figure
it out.
Thanks
 
After you open the report, put
DoCmd.GoToRecord acDataForm, formname , acNewRec

Be sure to put you formname in


HTH
Katrina
 
Katrina,
Thanks, I had left out the "acDataForm"
I appreciate your help.

Katrina said:
After you open the report, put
DoCmd.GoToRecord acDataForm, formname , acNewRec

Be sure to put you formname in


HTH
Katrina
Ron Weaver said:
I enter information on an Orders form. When finished, I print it. While it's
printing. I would like the Orders form to update to a new (blank) record.
Below is the "On Click" code I'm using on the print command button:
Private Sub Command142_Click()
'Save the record
DoCmd.RunCommand acCmdSaveRecord
'Open the report to just the record shown on the form
DoCmd.OpenReport "Order Details", acViewNormal, , "[OrderID]=" & [OrderID]
End Sub
I'm sure there is a simple answer to this, but I haven't been able to figure
it out.
Thanks
 
Back
Top