473,385 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problems with Conditional Formatting on Combo box.

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
4 3582
JConsulting
603 Expert 512MB
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
603 Expert 512MB
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
Oh my my my... that works wonderfully!

Thank you SO SO SO much!!

I really appreciate it.
May 10 '07 #4
JConsulting
603 Expert 512MB
Oh my my my... that works wonderfully!

Thank you SO SO SO much!!

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

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

Similar topics

2
by: Terry | last post by:
I have a form which displays data from both the Student Details table and the Exam Details table. The Name (Text Box) control is from the Student Details table and the Withdrawn (Check Box)...
2
by: jeffgeorge | last post by:
Trying to add 3 colors to 6 combinations of text possibilities. If this makes sense, the possibilities are: A D (one color for the combo beginning with A) A E B D (One color for the combo...
4
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
2
by: Megan | last post by:
Can you write conditional VBA code that affects only one or two records on a continuous subform? I have a form with a subform on it. The parent/ child field that links the forms is CaseID. The...
8
by: Typehigh | last post by:
I have many text fields with conditional formatting applied, specifically when the condition is "Field Has Focus". Without any events associated with the fields the conditional formatting works...
4
by: Michael R | last post by:
Does anyone know of such a way, or maybe have encountered an ActiveX control, that is able to have colors of conditional formatting on the drop-down list of a Combo box, besides the Combo box...
4
by: slinky | last post by:
Thanks in advance... I have a continuous style form with a field for each record called "STATUS". I simply want to have the form load and if the value of the textbox is "Inactive" I want the...
6
by: BUmed | last post by:
Hi all I’m trying to figure this out. But help is needed. I have a combo box called fcmFLAG with 5 options (problem, hold off, call, withdrew and ineligible). What I would like to do is have the...
3
by: aeon | last post by:
Working in Access 2007 on XP I have a combo box that I'm using in a form to select the WorkCategory assigned to a particular person in my database. WorkCategory is a lookup field in a table...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.