Transfer Data between two forms

J

JD McLeod

I have a form called “time sheetâ€. When the user wants to calculate the
total hours worked, they click on a command button that launches another
pop-up form “time calculation†which allows them to enter in the start and
ending time. It then calculates the total hours worked. I would like for
this data on “time calculation†to be transferred to the “total hours workedâ€
field on the form “time sheet†when the “time calculation†form is closed.
Any advice is much appreciated. Thanks.
 
J

Jeanette Cunningham

Hi JD McLeod,
you could use code on the unload event of the popup form to do this.

Something like this:

Private Sub Form_Unload(Cancel As Integer)
Forms!frmTimeSheet!TotHrsW = Me.TimeCalc
End Sub

Replace the form and control names above with the appropriate names.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

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