Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / December 2007

Tip: Looking for answers? Try searching our database.

Conditional Format or VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chad - 20 Dec 2007 13:16 GMT
Hello, I have a few text and combo boxes on my form that I want to have the
color change to red if there isnt any information selected in them. I was
going to use conditional formating but it only lets you use 3 Expresion is
and I have a few that need to cange red. I also wanted one of my text boxes
that have a value in it already that is 0.00 and if its that it will change
red but if there is a nember in it then it is normal. I dont know how to do
this? I was going to use IsNull([fieldName])=True in the expression is but
like I said I have about 5 text and combo boxes that need to turn red and one
with the 0.00 in in as well. how would I do this? Thanks!
Signature

Newbies need extra loven.........

John Spencer - 20 Dec 2007 14:01 GMT
Each control has its own set of conditional formats, so you can have up to 3
conditional formats for any control.

If you are saying that you want to change 5 controls based on the values of
any of the 5 controls that can be done also, by using a more complex
expression of by constructing a VBA function that returns true or false and
using that expression in EACH of the controls conditional formatting.

Signature

John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

> Hello, I have a few text and combo boxes on my form that I want to have
> the
[quoted text clipped - 10 lines]
> one
> with the 0.00 in in as well. how would I do this? Thanks!
Klatuu - 20 Dec 2007 14:40 GMT
There are actually 4 possible conditions.
Condition 1, Condition 2, Condition 3, and the default or what the condition
is set to in design view.
Signature

Dave Hargis, Microsoft Access MVP

> Each control has its own set of conditional formats, so you can have up to 3
> conditional formats for any control.
[quoted text clipped - 18 lines]
> > one
> > with the 0.00 in in as well. how would I do this? Thanks!
Chad - 20 Dec 2007 16:00 GMT
Ok, so I can use conditional formating for each control (Great), I will use
IsNull([fieldName])=True for the needed ones but what formula would I use for
the text box that holds a value of 0.00? I want this box to turn red if 0.00
is there and for it not to be red if there is anything else other than that.
Thanks!
Klatuu - 20 Dec 2007 16:04 GMT
Select Field Value Is, Eqaul To, and 0
Signature

Dave Hargis, Microsoft Access MVP

> Ok, so I can use conditional formating for each control (Great), I will use
> IsNull([fieldName])=True for the needed ones but what formula would I use for
> the text box that holds a value of 0.00? I want this box to turn red if 0.00
> is there and for it not to be red if there is anything else other than that.
> Thanks!
Chad - 20 Dec 2007 16:11 GMT
Im not good a writing code could you give me an example of what you mean?
Thanks!
Signature

Newbies need extra loven.........

> Select Field Value Is, Eqaul To, and 0
>
[quoted text clipped - 3 lines]
> > is there and for it not to be red if there is anything else other than that.
> > Thanks!
Klatuu - 20 Dec 2007 16:15 GMT
No code required.

Right click on the control you want to format.  Select Conditional
Formatting.  The conditional formatting dialog will pop up.  Make the
selections as listed in my previous post.

Signature

Dave Hargis, Microsoft Access MVP

> Select Field Value Is, Eqaul To, and 0
>
[quoted text clipped - 3 lines]
> > is there and for it not to be red if there is anything else other than that.
> > Thanks!
Chad - 20 Dec 2007 16:52 GMT
I had t read that post a few times but I get what your saying... Works great!
Thanks!
Signature

Newbies need extra loven.........

> No code required.
>
[quoted text clipped - 9 lines]
> > > is there and for it not to be red if there is anything else other than that.
> > > Thanks!
Chad - 20 Dec 2007 17:03 GMT
Klatuu, For some reason the IsNull([txtFootage])=True ect. for the other text
boxes isnt working? Is the code correct? Thanks!
Steve Schapel - 20 Dec 2007 18:22 GMT
Chad,

Correct syntax would be:
[txtFootage] Is Null

Signature

Steve Schapel, Microsoft Access MVP

> Klatuu, For some reason the IsNull([txtFootage])=True ect. for the other text
> boxes isnt working? Is the code correct? Thanks!
Chad - 20 Dec 2007 19:36 GMT
I got it with IsNull([txtFootage]).... Same thing! Thanks for the reply!
Signature

Newbies need extra loven.........

> Chad,
>
[quoted text clipped - 3 lines]
> > Klatuu, For some reason the IsNull([txtFootage])=True ect. for the other text
> > boxes isnt working? Is the code correct? Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.