To refer to a control on another form just use the form name and a . before the control name;
eg;
FormName.TextBox1.Text = "Hello"
so, in your example, the FormA button click event should be;
Sub CommandButton1_Click
FormB.TextBox1.Text = Calendar1.Value
End Sub
I've never used the calendar control so I'm not convinced .Value is the right property - if it isn't just change it to the appropriate property to retrieve the date.




Reply With Quote