Update form to new record while printing report.

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
 
K

Katrina

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

Be sure to put you formname in


HTH
Katrina
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top