Eileen,

You can call the Save action first on your main form by doing these:
1) Change the Private into Public on the very start of your Save code on
your main form.
2) Then on your subform, put this before calling your function

this code will call the save action on your main form...
[Forms]![YourMainFormName].YourSaveCommandButton_Click


YourMainFormName = this is the name of your main form
YourSaveCommandButton = this is the Save command button on your main form.

hth,
George



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of eileen1309
Sent: Friday, December 29, 2006 8:51 AM
To: [email protected]
Subject: [ms_access] saving a form


My situation is this:  I have created a for for posting cash called a
statement cash receipt entry.  Which list the sales person, and all
of their open invoice in a subform.

On the main form I list the sales person, date received, amtrcvd
(total check amount), balance 2 apply, check number, and deposit acct.

On the subform I have a listing of all open invoices for that sales
person, in addition I have a field called apply (boolean) which is a
check box.  If checked, it makes the amtrcvd equal to the amtdue and
reduces the balance to apply by the amtdue.  if unchecked, then it
reverses the action.  However if the amtrcvd is different then the
amt due I need to up the balance to apply by that amt and then reduce
the balance to apply by the new amt.

I can get this done if I save the main form first then it works
fine.  The function is actually called from the sub-form, how can I
save the main form before the change.

I am using the .oldvalue to capture what it was before the change
first as a variable.

I've tried, docmd.save acform, "formname" but it does not seem to be
working any ideas would be appreciated.

Sorry for such a long post,

Thanks
Eileen





Yahoo! Groups Links




Reply via email to