By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,275 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

Problems with Conditional Formatting on Combo box.

P: 3
Hi everybody - I'm a new access user and would appreciate some help.
I'm trying to create a form, on which I'm trying to disable/enable a combo box, based on the value entered in another combo box above it on the form.

Basically what I tried was to select the combobox in Design view - click on Format > conditional format.
Then I changed 'condition' to 'expression is'
then entered -> Category = Misc
and finally clicked on the enabled box hoping to grey it out.

The idea is that I have two combo boxes on the form, with values typed in (not from other tables). Selecting 'Misc' in the first box should disable the second one.

Any ideas? I'm desperate!!
May 10 '07 #1
Share this Question
Share on Google+
4 Replies


JConsulting
Expert 100+
P: 603
Hi everybody - I'm a new access user and would appreciate some help.
I'm trying to create a form, on which I'm trying to disable/enable a combo box, based on the value entered in another combo box above it on the form.

Basically what I tried was to select the combobox in Design view - click on Format > conditional format.
Then I changed 'condition' to 'expression is'
then entered -> Category = Misc
and finally clicked on the enabled box hoping to grey it out.

The idea is that I have two combo boxes on the form, with values typed in (not from other tables). Selecting 'Misc' in the first box should disable the second one.

Any ideas? I'm desperate!!
form_current event
Expand|Select|Wrap|Line Numbers
  1. if me.combo1.column(x) = "Misc" then
  2. me.combo2.enabled = false
  3. else
  4. me.combo2.enabled = true
  5. end if
  6.  
May 10 '07 #2

JConsulting
Expert 100+
P: 603
form_current event
Expand|Select|Wrap|Line Numbers
  1. if me.combo1.column(x) = "Misc" then
  2. me.combo2.enabled = false
  3. else
  4. me.combo2.enabled = true
  5. end if
  6.  
sorry, submitted too quick.

Put that code on your form's on_current event. Replace Column(x) with the field index in your Combo1 where 'misc' is found. for example, if your combo's rowsource is returning two fields, the far left is 0, next is 1, etc...

Hope this helps.
J
May 10 '07 #3

P: 3
Oh my my my... that works wonderfully!

Thank you SO SO SO much!!

I really appreciate it.
May 10 '07 #4

JConsulting
Expert 100+
P: 603
Oh my my my... that works wonderfully!

Thank you SO SO SO much!!

I really appreciate it.
anytime!
J
May 10 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.