save recordset of subform

P

peg

I have a form that has a subform (which then also has a couple subforms in
it)

On the 1st subform i have a button to print a report based on the info in
the subform.

My problem is if they just enetered or updated the data i can't get it to
save before it goes to print.

In the print command button code I placed: me.recordset.update but that
didn't do anything.

also tried this:

Set frm1 = Forms("ProgressNote")
Set ctl1 = frm1.Child6
ctl1.Form.Recordset.Update

that didn't do aything either.

Anyone have any ideas?? THANKS!!
 
G

Guest

Probably i haven't well understood what do you need, but..
if the data are entered in the same subform where there is the "print" button, just as debugging test, try this
place this code for the afterupdate event for the form underlying the subform

public sub form_afterupdate(
msgbox "data updated
end su

Then enter data in the subform e click anywhere outside the subform
Did the message appear
If yes, click the "print" button to see if the report print out properly with the updated data

If it works i'll give you samo more advice

By
Rocc
 
D

Dirk Goldgar

peg said:
I have a form that has a subform (which then also has a couple
subforms in it)

On the 1st subform i have a button to print a report based on the
info in the subform.

My problem is if they just enetered or updated the data i can't get
it to save before it goes to print.

In the print command button code I placed: me.recordset.update but
that didn't do anything.

also tried this:

Set frm1 = Forms("ProgressNote")
Set ctl1 = frm1.Child6
ctl1.Form.Recordset.Update

that didn't do aything either.

Anyone have any ideas?? THANKS!!

Put this in your button's code, before opening the report:

If Me.Dirty Then
RunCommand acCmdSaveRecord
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top