add new record - preview report -new data doesn't show

add new record - preview report -new data doesn't show

Post by YmFic » Wed, 16 May 2007 03:39:01


When I add a new record on a form and press the command button to display the
report. The new data added(bill rate-calc. value) does not display. Have to
exit report - go to form navigate back or up one record than show report and
the new record is visible. Do I add refresh - somewhere to the preview of
report code of the onclick event of the command button?????
Thanks,
Barb
 
 
 

add new record - preview report -new data doesn't show

Post by Rick Brand » Wed, 16 May 2007 03:51:45


Your new record is not yet saved and thus does not exist in the table(s)
that the report is looking at. Just issue a save before opening the report.

Me.Dirty = False
DoCmd.OpenReport...

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

 
 
 

add new record - preview report -new data doesn't show

Post by YmFic » Wed, 16 May 2007 03:58:03

Is this the save in code???

Me.Dirty = False

thanks,
barb
 
 
 

add new record - preview report -new data doesn't show

Post by Rick Brand » Wed, 16 May 2007 04:07:13


Yes. That is one of several ways to save the current record in code.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
 
 
 

add new record - preview report -new data doesn't show

Post by YmFic » Wed, 16 May 2007 04:15:00

Thanks so much. It worked!!!