Transfer Data between two forms

  • Thread starter Thread starter JD McLeod
  • Start date Start date
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.
 
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
 
Back
Top