Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

labels

Posted on 1998-12-31
8
Medium Priority
?
249 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 600 total points
ID: 1453523
No problems groone. Thanks.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

704 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