Update field on one form from nother

  • Thread starter Andrew @ CrazyCritters
  • Start date
A

Andrew @ CrazyCritters

Hi,

I have a form 'Frm_New_Booking'. On it I have a button to open another form
with a calendar on it so the user can select a date. The result ends up in a
variable 'The_Date'. There is a button on the form to close the form. I
want the value of the variable 'The_Date' to be placed in field 'DOB" On
'Frm_New_Booking'.

Please advise.

Andrew
240508
 
W

Wayne-I-M

Hi

There are other ways to do but I would just add a line of code to close
button on your calender form t set the alue of The_Date on the new booking
form (This only works if both forms are open). If you have closed New
Booking form, post back for a slightly different code


Private Sub ButtonName_Click()
Forms!Frm_New_Booking!DOB = Me.The_Date
DoCmd.Close
End Sub
 

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