By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,223 Members | 1,371 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,223 IT Pros & Developers. It's quick & easy.

return value from form

P: 64
Hi there,

How can i return value form a form.

What I want to do is

If I click on a button a new form opens up which has a calendar control.
I select a date and click on close.
and the date gets populated in a field of the main form

Thanks
Yogesh
Jun 22 '07 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
Assuming your calendar control is called ActiveXCtl0 then put this in the On Click event of the calendar object.

Expand|Select|Wrap|Line Numbers
  1. Private Sub ActiveXCtl0_Click()
  2.  
  3.     Forms![MainFormName]![TextboxName] = Me.ActiveXCtl0.Value
  4.  
  5. End Sub
Jun 22 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.