Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the textbox parent property?

Status
Not open for further replies.

abzmalone

Programmer
Apr 6, 2000
3
GB
Hi Folks,<br><br>I am working with Access 2000 and have a textbox control which I need to move around a form depending on user input.&nbsp;&nbsp;This means that the textbox's parent is either the main form itself or a page on a tabbed control.<br><br>How can I do this programmatically?&nbsp;&nbsp;The parent property is read-only.&nbsp;&nbsp;This kills me. I don't want to have to create the control each time as this is the only option I know of which permits the parent property.<br><br>Many thanks for your assistance
 
Don't know the answer to your question but may have a solution. Use 2 copies of the control, one in each place you need it. In the AfterUpdate event of both, set them equal to each other. Then just make one or the other visible depending on your situation. A good place to put the logic is in the AfterUpdate event of the field with the value that determines this, also the OnCurrent event of the form (so that it changes if you move to the next or previous record.
 
Cheers for the idea.&nbsp;&nbsp;Turns out I must have been working too hard.&nbsp;&nbsp;I re-thought what I was trying to achieve and solved it by NOT needing to change parent mis-stream.<br><br>Thanks again.<br><br>Abz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top