Force Record Write

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a command button located on a subform that opens a report. The
subform has several fields, including yes/no check boxes. When I press the
button to open the report--that reflects the data on the subform--it does not
show the just-entered data. My understanding is that because I have not
moved to a new record, the just-entered data has not yet been written to the
table and since the report is drawing its information directly from the
table, it doesn't 'see' it. Can someone please advise me on a good way to
force a write to the record without actually moving to a different record?
 
hi Scott,
Can someone please advise me on a good way to
force a write to the record without actually moving to a different record?
The following is also a possible solution:

If Me.Dirty Then Me.Dirty = False
DoCmd.OpenReport "TEST", acViewPreview


mfG
--> stefan <--
 
I have a command button located on a subform that opens a report. The
subform has several fields, including yes/no check boxes. When I press the
button to open the report--that reflects the data on the subform--it does not
show the just-entered data. My understanding is that because I have not
moved to a new record, the just-entered data has not yet been written to the
table and since the report is drawing its information directly from the
table, it doesn't 'see' it. Can someone please advise me on a good way to
force a write to the record without actually moving to a different record?

In the code for your button's Click event procedure, you can add this:
DoCmd.RunCommand acSaveRecord
 
Back
Top