return value from form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ykhamitkar
    New Member
    • May 2007
    • 64

    return value from form

    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
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Assuming your calendar control is called ActiveXCtl0 then put this in the On Click event of the calendar object.

    [CODE=vb]
    Private Sub ActiveXCtl0_Cli ck()

    Forms![MainFormName]![TextboxName] = Me.ActiveXCtl0. Value

    End Sub[/CODE]

    Comment

    Working...