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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Last Record of Subform Not on Report 1

Status
Not open for further replies.

mrgrogro

Technical User
Jan 8, 2005
58
0
0
US
I have a form with a subform from which I create a report that is e-mailed in Snapshot format. All works suprisingly well considering the author. However, if I don't cycle completely through the subform to the point a new (blank) subform record is created, the last subform record (that only has part of the possible data) does not appear on the report. I'm sure there I can't be the only one with this problem. (Just the last to learn) Because I'll have many users contributing data and e-mailing, I need to foolproof the process. Is there lind of code I can add to to the lost focus event or another solution? I'm using Access 97 and would appreciate any advice you can offer. Thanks in advance.
 
Could it be that the last record on the subform is not saved when you send the report?

If that is the issue you could use the following line of code to save the record.

docmd.RunCommand acCmdSaveRecord

When you cycle through all the records, you are saving the record by moving off of it. Hitting the recordseletor and closing the form will also force the record to save. As well as hitting the save record button on the toolbar (different from the save button).
 
Thanks so much! I'll give that a try. You've made my day.

mgrogro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top