Solved

labels

Posted on 1998-12-31
8
243 Views
Last Modified: 2010-05-03
I have a database and I can gather all the fields in to variables.  There may never be the same amount of fields in the database so the number of my variables will change.  Now for the good part.  I need a label and corresponding text box per variable.  As stated the number of variables will not be constant so the number of labels and text boxes can not be constant.  thanks
0
Comment
Question by:groone
  • 4
  • 2
  • 2
8 Comments
 
LVL 1

Expert Comment

by:MAVERICK
ID: 1453516
You could try using a control array .......
ie... Listbox(0) listbox(1) etc...

0
 
LVL 3

Author Comment

by:groone
ID: 1453517
Hmm, I guess what i need is to be able to create labels on the fly because if I use a control array i still have to populate my form with a determined amount of controls.  From what i have read, it is not possible to create controls on the fly ;x
0
 
LVL 1

Expert Comment

by:MAVERICK
ID: 1453518
I've seen it done.. But I'd have to try and make a sample first :)
 
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 1

Expert Comment

by:agrillage
ID: 1453519
Controls can be created on the fly using the Load Statement. For example

Load TextBox1(1)

When TextBox1(0) already exists. If you also put your field variables into a dynamic array (check out the ReDim keyword) you can find out how many you have using the UBound function.
0
 
LVL 3

Author Comment

by:groone
ID: 1453520
Good lord, for the points i would expect to see a little snippet of code as an example or more of a definition on how to use the objects you described.
0
 
LVL 3

Author Comment

by:groone
ID: 1453521
Sorry agrillage

I started playing with the UBound function and the load statement and there really was not much to it.  For some reason i thought it was going to be complicated.  Your answer was perfectly acceptable.  Please reanswer this question for the points.  That will teach me to look at this place when i just wake up ;x
0
 
LVL 3

Author Comment

by:groone
ID: 1453522
Sorry agrillage

I started playing with the UBound function and the load statement and there really was not much to it.  For some reason i thought it was going to be complicated.  Your answer was perfectly acceptable.  Please reanswer this question for the points.  That will teach me to look at this place when i just wake up ;x
0
 
LVL 1

Accepted Solution

by:
agrillage earned 200 total points
ID: 1453523
No problems groone. Thanks.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question