Form button to update records when clicked

YNWA

Registered User.
Local time
Today, 09:56
Joined
Jun 2, 2009
Messages
905
I have a form used for editing employee data (frmMain) (pension rate, name etc..), on this form is a button to open a new form (frmpayment). If I edit data on frmMain and click the frmpayment button, the data I have just edited is not updated, so when submitting a payment the details are wrong.

The ways around this I have found is putting a save button on the frmMain to clikc once you edit data and also if you click to next record it updates.

However is it possible to build a function into the Open Payments Form button, so when clicked, it opens the frmPayments and also updates the data you have just edited in the frmMain?

Any help?
Thanks
Will
 
are you using a macro - if so you could just add the line "runcommand - saverecord" before you open the 2nd form.

If not someone will know the vb code to do the same thing.
 
I am not using any macros, but I can do.

So create marco to run on the Mouse Down event procedure or....?
 
just execute the macro from the "on click" event from the button.

have 2 commands in the macro - 1stly save the record then 2ndly open the form.

i am no expert but I use these simple solutions sometimes.
 
It opens the form fine, but won't save the form.

How do I make it save the record ?
 
add the action "runcommand" with "saverecord" as the argument.

You could always close the first form which should also save it...if this doesnt work I doubt I can be anymore help.
 

Users who are viewing this thread

Back
Top Bottom