ComboBox appear as a result of value chosen in another ComboBox

G

Guest

I have a form with several controls. One of them is a ComboBox where the user
can select several values stating a project phase.

I want another ComboBox to appear (or be enabled, available for user input)
ONLY if the user selects a specific value in the “source†ComboBox.

For example: If the user selects “Specification†(a project phase), nothing
happens. If the user selects “Executionâ€, a ComboBox should appear (or be
enabled, if it’s impossible to make a comboBox appear).

How can I do this?

Thank you for your time and assistance.
 
M

moscat via AccessMonster.com

In the properties of the Combo Box, create an event in the On Current option
and have the following:

Me.Combo2.Visible=False

If Me.Combo1="Execution" Then
Me.Combo2.Visible=True
Else
Me.Combo2.Visible=False
End If
 
F

fredg

I have a form with several controls. One of them is a ComboBox where the user
can select several values stating a project phase.

I want another ComboBox to appear (or be enabled, available for user input)
ONLY if the user selects a specific value in the ´source¡ ComboBox.

For example: If the user selects ´Specification¡ (a project phase), nothing
happens. If the user selects ´Execution¡, a ComboBox should appear (or be
enabled, if itÿs impossible to make a comboBox appear).

How can I do this?

Thank you for your time and assistance.

Code the Combo1 afterUpdate event AND the Form's Current event:

Me.Combo2.Visible = Me.Combo1 = "Execution"
 
G

Guest

In the current event of the form I put Me.Combo2.Visible = Me.Combo1 =
"Execution"

I did the exact same thing in the after update event of the "source" combo
box.

Access says that the macro Me does not exist.
 
F

fredg

In the current event of the form I put Me.Combo2.Visible = Me.Combo1 =
"Execution"

I did the exact same thing in the after update event of the "source" combo
box.

Access says that the macro Me does not exist.

In Form design view, select the combo box. Display it's property
sheet.
Click on the Event tab.
On the combo box's AfterUpdate event line, write:
[Event Procedure]
Then click on the little button with 3 dots that appears on that line.
When the code window opens the cursor will be flashing between 2
already existing lines of code.
Between those 2 lines, write:

Me.Combo2.Visible = Me.Combo1 = "Execution"

Change Combo1 and Combo2 to whatever the actual names are of the two
combo boxes.

Save the changes.
Then follow the above instructions and do the same thing of the Form's
Current event.
 

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

Top