On Fri, 4 May 2007 10:49:34 -0400, Robert wrote:
I have a form with a print button on it which opens a report. I specify the
id in the where clause in the OpenReport statemt say the report prints for
the current record. This works fine for existing records in the table. But
when I add a new record I have to arrow backward and then forward to get it
to print. I tried Me.Requery but it sent me to the first record in the
table.
How can I print the current record on the form?
Robert
Access does not save new records until you either go to a different
record (that's why iot works when you go backward or forward), close
the form/database or expressly tell it to save the data.
In the click event of the code used to open the report:
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "ReportName", acViewPreview, , etc.....
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail