conditional formatting syntax

  • Thread starter hireagenius via AccessMonster.com
  • Start date
H

hireagenius via AccessMonster.com

Hi,
I learned from a previous post that using conditional formatting on a control
in a subform won't work properly, if you are displaying more than one record
in the subform.

Thank you all for your kind assistance.

So now I don't know the syntax for conditional formatting - I have searched
the Access help files, my two programming books, I looked how I did it once
in Excel; I tried various things in the subform but havent gotten it correct.
Thank you for your patience.

I am using Expression Is

The two fields I want to compare are Oct and Nov.

If Nov is greater than Oct, I would like the cell red.

Thank you, CarlaGay
 
H

hireagenius via AccessMonster.com

I wasn't too clear in this message. The first time I was using VBA code. Now
I am just trying to use the Conditional Formatting functionality available in
the Access Menu.
 
M

Marshall Barton

hireagenius said:
So now I don't know the syntax for conditional formatting - I have searched
the Access help files, my two programming books, I looked how I did it once
in Excel; I tried various things in the subform but havent gotten it correct.
Thank you for your patience.

I am using Expression Is

The two fields I want to compare are Oct and Nov.

If Nov is greater than Oct, I would like the cell red.

[Nov] >[Oct]

For some strange reason I have never figured out, the
field/control names must be in [ ]
 
J

John W. Vinson

hireagenius said:
So now I don't know the syntax for conditional formatting - I have searched
the Access help files, my two programming books, I looked how I did it once
in Excel; I tried various things in the subform but havent gotten it correct.
Thank you for your patience.

I am using Expression Is

The two fields I want to compare are Oct and Nov.

If Nov is greater than Oct, I would like the cell red.

[Nov] >[Oct]

For some strange reason I have never figured out, the
field/control names must be in [ ]

It's because without the brackets Access thinks you're talking about text
strings - and the text string "Nov" is in fact less than the text string
"Oct". It'll never even think to look in the fields in your table.

If you in fact have *TABLE FIELDS* (as opposed to, say, a crosstab query)
named Oct and Nov you've got lots worse problems than conditional formatting
syntax!
 
M

Marshall Barton

John said:
hireagenius said:
So now I don't know the syntax for conditional formatting - I have searched
the Access help files, my two programming books, I looked how I did it once
in Excel; I tried various things in the subform but havent gotten it correct.
Thank you for your patience.

I am using Expression Is

The two fields I want to compare are Oct and Nov.

If Nov is greater than Oct, I would like the cell red.

[Nov] >[Oct]

For some strange reason I have never figured out, the
field/control names must be in [ ]

It's because without the brackets Access thinks you're talking about text
strings - and the text string "Nov" is in fact less than the text string
"Oct". It'll never even think to look in the fields in your table.


Right, but isn't it odd that a string does not need to be
quoted? Try that in a control source expression or SQL and
it will presume the unquoted string is a name. Seems to me
it would have been more consistent to have used the
Expression Service instead of whatever it is that adds
quotes. The query design grid's criteria is the only other
place I can think of that does that and it only does it when
the string is not the name of a field.
 
J

John W. Vinson

Right, but isn't it odd that a string does not need to be
quoted? Try that in a control source expression or SQL and
it will presume the unquoted string is a name. Seems to me
it would have been more consistent to have used the
Expression Service instead of whatever it is that adds
quotes. The query design grid's criteria is the only other
place I can think of that does that and it only does it when
the string is not the name of a field.

It is odd, but then nobody's ever accused Microsoft's programmers of being
consistant!
 
H

hireagenius via AccessMonster.com

Oh, duh! I was way over complicating it with If statements, etc. Thank you
for your patience.
Marshall said:
So now I don't know the syntax for conditional formatting - I have searched
the Access help files, my two programming books, I looked how I did it once
[quoted text clipped - 6 lines]
If Nov is greater than Oct, I would like the cell red.

[Nov] >[Oct]

For some strange reason I have never figured out, the
field/control names must be in [ ]
 
T

tom_willpa

high quality Soccer jerseys NBA Jersey tracksuit and jackets, GHD
hairstraightener supplier from www.willpa.com

Are you a Retail businessman who bother by the purchase price? China
Cheapest TOP wholesale website can help you

we are specialize in replica sport goods manufacturing in china, we can
offer you all kinds of soccer jersey, NBA jersey,shoes and so on. they are
the best brand replica goods whih are look the same as the original goods.
excellent quality and steady supply for them. we have been marketed in Europe
and American for 3 year. all the goods we offer are AAA quality. our soccer
jersey are Thailand style. If any goods you buy from my company have problem,
we will refund or resend them again. Most of ourProducts have no minimum
order requirements,soyou can shop retail goods at wholesale prices. if you
can buy more than 300usd. We offer free shipping. The more you buy the more
discount for you.

National soccer jerseys: http://www.willpa.com
Club soccer jerseys: http://www.willpa.com
NBA Jerseys: http://www.willpa.com
T-shirt and shirt: http://www.willpa.com
Tracksuit: http://www.willpa.com
Hoody & Jackets: http://www.willpa.com
UGG boots: http://www.willpa.com
Hair style: http://www.willpa.com
shopping Index: http://www.willpa.com

EMS shipping. 7days arrive, paypal accept

want more information pls contact us or check our website: www.willpa.com
 
T

tom_willpa

high quality Soccer jerseys NBA Jersey tracksuit and jackets, GHD
hairstraightener supplier from www.willpa.com

Are you a Retail businessman who bother by the purchase price? China
Cheapest TOP wholesale website can help you

we are specialize in replica sport goods manufacturing in china, we can
offer you all kinds of soccer jersey, NBA jersey,shoes and so on. they are
the best brand replica goods whih are look the same as the original goods.
excellent quality and steady supply for them. we have been marketed in Europe
and American for 3 year. all the goods we offer are AAA quality. our soccer
jersey are Thailand style. If any goods you buy from my company have problem,
we will refund or resend them again. Most of ourProducts have no minimum
order requirements,soyou can shop retail goods at wholesale prices. if you
can buy more than 300usd. We offer free shipping. The more you buy the more
discount for you.

National soccer jerseys: http://www.willpa.com
Club soccer jerseys: http://www.willpa.com
NBA Jerseys: http://www.willpa.com
T-shirt and shirt: http://www.willpa.com
Tracksuit: http://www.willpa.com
Hoody & Jackets: http://www.willpa.com
UGG boots: http://www.willpa.com
Hair style: http://www.willpa.com
shopping Index: http://www.willpa.com

EMS shipping. 7days arrive, paypal accept

want more information pls contact us or check our website: www.willpa.com
 

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