combo boox activation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi
i have created a production log sheet in access i have the main form that
users use with 7 combo boxes that are filled in as required. Note not all 7
boxes are always used so what i would like to know is, is it possible to only
make a combo box active/available to use when the previous one is used?

would appreciate any help
 
This sounds like a classic one-to-many relationship. Assuming that is the
case, you should not have 7 combo boxes, you should have a separate table
with a key field of some kind (customer number, Employee number, etc.) and
your combo-box.

If a particular customer/employee/etc. needs one entry, you add one. If it
needs 7, you add 7.

Sounds like you might need to normalize your database.

Rick B
 
Yes, set the Enabled property to False to disable a control, or to True to
enable it. You'll need to add code to the AfterUpdate event procedures of
the other controls, and the Current event procedure of the form, to set the
property appropriately when the values of the controls change, and when the
user moves to a different record.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
You could set the Enabled property for a combo box (let's call it
cboMyComboBox) to No, then set the After Update event for another combo box
to:
Me.cboMyComboBox.Enabled = True
You could do the same thing with the Visible property if you prefer to hide
the combo box until it is needed, and you could use an event such as Got
Focus instead of After Update, depending on what you want.
At the risk of explaining what you already know, double click the combo box
to see its property sheet so that you can set the Enabled property. To add
code, click the Event tab on the property sheet, click After Update, click
the three dots, click Code Builder, OK. As you start to type in the code
window it will provide options for completing what you start to type. As you
click each item on the property sheet you will see a description in the
status bar at the bottom of the screen. If you do not see the status bar,
click Tools > Options > View, and place a check mark in Status Bar.
 
Back
Top