Is this allowable? I am converting a VBP to and OCX.
Printable View
Is this allowable? I am converting a VBP to and OCX.
Are you making a usercontrol?
If so, then you certainly can add a module to it.
Ok. I can get it to go to the module but cannot find the components on the object
<vbcode>
If Txtstreet.Text = "" And Search.Txtlast.Text = ""
</code>
I tried it with and with out the control name. How do I refrence it?
:confused: I'm confused. Are you trying to search something based on the contents of a textbox?
What will/does this .OCX do?
Yes. I have several textboxes/combo boxes that depending on the data supplied, creates the sqlstring and searches the database.
I found that typed text in the code will capitalise the names correctly, but as seen in the code, it will not find the textboxes. The controls name is Search and the module Global.
Stumped on monday morning. Sheesh, the rest of the week better be better :)
It would seem that all of your searching is going to be done on the usercontrol itself where it should be able to recognize all of the controls embedded in it.
What are you using the module for?
I whipped together a real simply user control that simple looks at the text in two textboxes and tells me whether the text matches or does not match. When I loaded the .OCX into a project and ran it, it worked just fine.