help creating dynamic forms

  • Thread starter Thread starter mas
  • Start date Start date
M

mas

Hello All,

I need help creating a form. I have a list of names that I get from a access
query. The list is not alway going to be the same length or have the same
data. I want to associate a number (1 - 7) with each of the names. How can I
do that dynamically with a form?

Here's what I am looking for:

Name 1 pull down menu with the number 1-7
Name 2 pull down menu with the number 1-7
..
..
..
Name n pull down menu with the number 1-7

I know how to use a ComboBox on forms, but how do I make it dynamic and
place additional ComboBox's dependant upon the number of Name's.

Thanks,
 
mas

I don't understand what the 1-7 means. Is that an example of when you have
seven names? Do you want one combobox for each name? How will you know how
many names there are? You get them from access, but are they in a range or
in a recordset or what?

Generally, the way I do it is to have as many comboboxes on the form as I
could possibly have names. I set all of their Visible properties to False.
In the forms Initialize event, I determine how many boxes I'll need and make
just that many visible.

That works well when the maximum number of boxes isn't far from the median
number of boxes. If you normally need 10 boxes but the maximum is 100, you
might want to create them on the fly so you don't have so many wasted boxes.
On the other hand, if you normally need 10 and the max is 20, just create
them all at design time and use the visible property to show what you need.
To create comboboxes at run time, see here

http://groups-beta.google.com/group...ramming/browse_thread/thread/28ceac2c6ba673bb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top