Combo Box - Quick Question

S

ssignore

Hello MS Online Community!
I have a combo box with 4 possible selections. One of the selections is
"Other". Is it possible (without VB scripting!) that when a User chooses
"Other" from the combo box to have a text or memo box enabled for additional
entry? Only if "Other" is chosen?
Many thanks for the help!
Regards,
Simone
 
D

Douglas J. Steele

Without code? No, I don't see any way it's possible.

However, it's only 1 line of code:

Private Sub MyComboBox_AfterUpdate()

Me!MyMemoField.Enabled = (Me!MyComboBox = "Other")

End Sub
 
N

NG

Hi,

I dont think it's possible without a little VBA or macro, but it takes very
little code to achieve:

in the "AfterUpdate" event of the combo box , write something like:
If me.Combo = "other" then
me.txtExtraInfo.enabled = true
else
me.txtExtraInfo.enabled = false
end if

To be correct you can enter this code also in the Oncurrent event of the
form. This way the user can always alter the extra info if the current
record contains "Other" info.
 
S

ssignore

Many thanks, Noëlla! We'll give it a shot!

NG said:
Hi,

I dont think it's possible without a little VBA or macro, but it takes very
little code to achieve:

in the "AfterUpdate" event of the combo box , write something like:
If me.Combo = "other" then
me.txtExtraInfo.enabled = true
else
me.txtExtraInfo.enabled = false
end if

To be correct you can enter this code also in the Oncurrent event of the
form. This way the user can always alter the extra info if the current
record contains "Other" info.
 
G

ghetto_banjo

You will have to do it with VB scripting i believe.

But it is pretty easy!


On the After Update event of your combo box,
use this code:

Private Sub ComboBoxName_AfterUpdate()

if me.comboBoxName = "Other" then
me.textBoxName.enabled = True
else
me.textBoxName.enabled = False
end if

End Sub
 

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