Question: Button to add combo box in form view

Rawr

Registered User.
Local time
Today, 04:58
Joined
Jun 27, 2011
Messages
14
Hello,

Let me start off by saying that I am somewhat of a intermediate novice with access 2007, so feel free to dumb things down for me :)

My problem is as followed:

Currently, I am building a database that contains a form with 50 of the same cascading combo boxes. After looking at the form myself, I thought that 50 boxes looks very unpleasant, and my colleagues agree.

My question is, how can I make it so the user starts off viewing about 10 combo boxes, and if they need to input more data, they can click a button that will show or create more boxes in which they can input their data?

Thank you for your time. :)
 
Hi,

50 Combo boxes sound like a daunting task for a user to complete, frightening in fact. are you sure there's no way of cutting this down.

If not you could use one of two methods.

1. Hide the combo boxes until thy're needed.
On the AfterUpdate event of a combo box use something like

Me.YourComboBoxName.visible = true

to show the next one or more.

You should also implement some checks to make sure the combo box has valid data and isn't empty, perhaps where user backs out, or what happens if he goes back after making a valid selection and then deletes that entry.

2. You could re-use a combobox by changing the RecordSource and RowSource through code, this is a little more tricky and can become a mess as you then also have to consider combobox settings like columncounts, columnwiths and bound column.

However, I would strongly recommend going back to see if this really is the most user friendly way of getting the information you need, or do you even need so much information at one time, in other words can the user enter it in stages as and when it's needed.

SmallTime
 
Sorry forgot to mention set the visible property of the combo boxes you want hidden to FALSE

you could also use the code below in the OnClick event of a button

Me.YourComboBoxName.visible = true

One entry for each comboBox that you want to show so it would look something like;

Me.YourComboBoxName1.visible = true
Me.YourComboBoxName2.visible = true

and so on....

SmallTime
 
Thank you for your response.

I have tried the first method, and it seems to work. My knowledge of access is limited, so I will just have to endure this tedious process.

And regarding your recommendation, I am just not sure. All I know is that the recipient specified cascading combo boxes as one of the major requirements. They also want the combo boxes all on one form.

The user is supposed to select various counties and municipalities that their department is responsible for. Some offices have less than 10, while others have up to 50. To satisfy all the offices, I have included 50 cascading combo boxes.

If you have any ideas, I'm more than open to trying them.

:D
 
Glad it worked out.

Without know much about what database it supposed to do.

Wouldn't it be a good idea to simply select a municipality which then could populate the related fields e.g. country. Surely each country has unique municipalities or in other words each municipality belongs to unique country.

I generally filter data for specific departments\Teams so they only see what's relevant to them.

Just a thought

Take care
SmallTime
 

Users who are viewing this thread

Back
Top Bottom