Getting Data from one Form to another

  • Thread starter Thread starter briambo
  • Start date Start date
B

briambo

Guest
Hello,

As this is my first post I want to ask you this mind boggeling question (at least for me).

I have created 2 forms one with some data from a table and one with just a Calender from the Active X thingy. If you click a button on the first form you go to the Calender, there you have to click a date and that date should appear in the first form . Now I have already figuered out that this has to be done with VBA and it should be done when the form with the calender is closed.

Now if you please would like to keep it as simple as possible that a n00b like me could understand this I would appreciate it.
 
Place a text box on your calendar form called txtDaily

In the close button on your Calendare Form in the On Click Eevent
enter the following code......... Assuming your Activex Thingy is called Calendar1


Me.TxtDaily = Me.Calendar1.Month & "/" & Me.Calendar1.Day & "/" & Me.Calendar1.Year

'Add the Chosen Date To The Other Open Form And Then Close The Calendar Form

Form![otheropenform].[displaythedate]=Me.TxtDaily


'Now close Calendar Form
Docmd.Close
 
Last edited:

Users who are viewing this thread

Back
Top Bottom