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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

runtime textboxes

Status
Not open for further replies.

gollie

Programmer
Jun 20, 2003
3
ZA
hey there!

I created a VB6 Application and a report wizard that lets a user to select parameters that he/she wants to appear on the report. the parameters are actually fields from an MS Access table with more than 20 fields. the user may select to compose a report using only,say 2, parameters or even 19,now I want the report to AutoCreate the textboxes accordingly with the number of parameters chosen, I don't want to create the textboxes myself,the problem comes where the I have to create them during runtime how can I go about this?
Iam using:VB6,MSAccess and DataEnvironment

 
There are many threads here about "Dynamic Control Creation". Please do a search for them.

Basically, you need a text box that is an array ( it has an index ). Then you can add more controls to the form by using the load command.

i.e. I have a text box named MyText. It has an index of 0.

I can then do:

Load MyText(1)

To add a new text box to the form. Then you can position it by setting it's top and left values, and so on.

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top