Solved

labels

Posted on 1998-12-31
8
240 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
 
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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.
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…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now