Update

  • Thread starter Thread starter Derek
  • Start date Start date
D

Derek

Hi All

How the hell do i use Update on a subforms records. Will
this allow me to print imediately without refreshing
records. When I have a new record in the main form and a
new one in the subform I get an error when trying to print.

Help it's driving me crazy
 
You don't mention if your print button is on the main form, or the sub-form.

The best solution is to make a report that shows all of the information, and
then restrict this report to the ONE MAIN record you are looking at.

And, yes, before you launch the report, you need to force a disk write. The
code to print the ONE record is:


me.Refresh ' force disk write

docmd.OpenReport "yourReportName",acViewPreview,,"id = " & me.id
 
Thanks Albert

The problem is not selecting the record to print but I
have a report that prints only the curent record based on
Main and subform. I use a popup form to select standard
letters that I programatically insert into the subforms
underlying table and then move to the new record on the
subform. So it may be that I am trying to print before the
record is dirty. If I do this I am reasonably sure that I
have to update the record because refresh just does not
work. I have to close the form and reopen it. I have read
about Update but cannot figure out how to select the
subforms record to force an update.

Any Ideas?
 
Back
Top