By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,537 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,537 IT Pros & Developers. It's quick & easy.

Print a report problem

P: n/a
Hi i need to be able to print a report to act as a receipt for
customers.

If i put a button on a form to do this it wont print the current
details on a newly created form (Prints Report with no completed
details from textboxes) It works if i click to go to next record and
then come back (Saving record). Would idealy like to be able to print
whats currently been filled in the current record.
Do i need to get it to save the form before i print report.

Is this possible? If so how?

Cheers

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I believe there are a few ways to save the current record using VBA or
macros. Access 2003 generated the following code for me:

Private Sub cmdSaveRecord_Click()
On Error GoTo Err_cmdSaveRecord_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70

Exit_cmdSaveRecord_Click:
Exit Sub

Err_cmdSaveRecord_Click:
MsgBox Err.Description
Resume Exit_cmdSaveRecord_Click

End Sub

Nov 13 '05 #2

P: n/a
Before the OpenReport line, add:
RunCommand acCmdSaveRecord
or perhaps:
If Me.Dirty Then Me.Dirty = False

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<si************@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi i need to be able to print a report to act as a receipt for
customers.

If i put a button on a form to do this it wont print the current
details on a newly created form (Prints Report with no completed
details from textboxes) It works if i click to go to next record and
then come back (Saving record). Would idealy like to be able to print
whats currently been filled in the current record.
Do i need to get it to save the form before i print report.

Is this possible? If so how?

Cheers

Nov 13 '05 #3

P: n/a
Nice one thanks that worked

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.