M
mollyf
I have multiple user controls on a form. I have a save button on each
control so the users can save as they go and on the parent form, I have
another button which will save/update everything entered in on the user
controls. My problem is that I cannot access the different controls on
the user control. I changed the "protected" to "public" for each
textbox that I'm wanting to "see" in the parent form. In my parent
form, I have Protected WithEvents RecipInfo As ctrlRecipInfo (with
ctrlRecipInfo being the control I want to access). I can see each of
the textboxes in my parent form but when I execute the code, I get
"Object reference not set to an instance of an object." as soon as it
gets to RecipInfo.txtFName.Text.
Obviously RecipInfo isn't an instance of the object ctrlRecipInfo but I
have no idea of where and how to do that.
Thanks.
Molly J. Fagan
Oklahoma Foundation for Medical Quality
control so the users can save as they go and on the parent form, I have
another button which will save/update everything entered in on the user
controls. My problem is that I cannot access the different controls on
the user control. I changed the "protected" to "public" for each
textbox that I'm wanting to "see" in the parent form. In my parent
form, I have Protected WithEvents RecipInfo As ctrlRecipInfo (with
ctrlRecipInfo being the control I want to access). I can see each of
the textboxes in my parent form but when I execute the code, I get
"Object reference not set to an instance of an object." as soon as it
gets to RecipInfo.txtFName.Text.
Obviously RecipInfo isn't an instance of the object ctrlRecipInfo but I
have no idea of where and how to do that.
Thanks.
Molly J. Fagan
Oklahoma Foundation for Medical Quality