Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fix needed for print Bug In Access 2

Status
Not open for further replies.

mooneye

Technical User
Jan 14, 2002
27
IE
I have a command button that prints the current record in access. When I insert a new record and then try to print it a blank report is printed, but then if I exit out of that form re-enter and then try to print the record the record will print correctly. Any help on fixing this bug would be appreciated.
 
The problem you are encountering is not due to a printing error.

The record you are in is not saved until you leave the record, and move to a different record. Thus when you click on the print button, it sees a blank new record.

This is by default and access saves upon the change in focus (from one record to another). You can save the record you are in with out leaving it - to do so, you need to do a [shift] enter. This will save the current record.
 
You can also put this code in the OnClick event before the code for printing the record.

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

This will save the record and the proceed with the printing.

Dawn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top