|
-
Nov 14th, 2005, 10:51 AM
#1
Thread Starter
Addicted Member
Calling a procedure from a UserControl?
If I have a UserControl (UsrCtlDate) which contains a textbox (txtDate_D), how do I call a procedure which lies in the active form when the event "txtDate_D.validating" is fired?
I tried "Form.ActiveForm.Procedure1" which doesn't work. I also tried declaring a string which contains the name of the current active form, and then using If statements with specific Form names (e.g. If CurrentForm = "frmData" then frmData.Procedure1), which also didn't work. Lastly, I tried UserControl.Parent.Procedure1, which also failed.
How can I call a procedure which lies in the active form from the UserControl?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|