From: Bob Vance on
Thanks John tbAdditionalCharge is Text
tbAdditionChargeAmount is Currency
Both are record source is a table
I am using Expression Is
With your code I am getting Invalid Syntax you must enclose your text data
in Quotes
Thanks Bob

"John Spencer" <spencer(a)chpdm.edu> wrote in message
news:uKjCHUazKHA.1796(a)TK2MSFTNGP02.phx.gbl...
> Just want to confirm you used
> Expression Is
> and then entered
> [tbAdditionCharge] Is Null And [tbAdditionChargeAmount],0 > 0
> and both fields (not controls) are available in the record source of the
> form or report.
>
> What field type is tbAdditionCharge? If it is a text field it is possible
> that it contains a zero-length string instead of null. You might try
> ([tbAdditionCharge] Is Null or [tbAdditionCharge] = "") And
> [tbAdditionChargeAmount],0 > 0
>
> John Spencer
> Access MVP 2002-2005, 2007-2010
> The Hilltop Institute
> University of Maryland Baltimore County
>
> Bob Vance wrote:
>> Thanks Sylvain, but neither code worked of yours , I looked at my first
>> post and it is correctly worded, if tbAdditionCharge is null and
>> tbadditionChargeAmount is more than 0 condition to make background "Red"
>> of tbAdditionCharge
>> Thanks Bob


From: John Spencer on
That is strange. I'm not at all sure what that error message is saying. Since
if you entered it as I posted it the only thing that could be interpreted
would be the two quote marks. I am assuming you didn't attempt to enter four
single quotes or leave off the brackets around the field names.

I just tested the following expression on one of my sample databases and it
behaves as expected and I am not getting any error (Access 2003).

[fLink] Is Null Or [fLink]=""

I did notice that somehow what I posted seems to have a Picked up an extra
comma and zero. What I meant to post was the following (all on one line)

([tbAdditionCharge] Is Null or [tbAdditionCharge] = "") And
[tbAdditionChargeAmount] > 0

You might try testing out the conditional formatting by putting in just one of
the comparisons and see if that works. If it does add another.

Try
[tbAdditionCharge] Is Null

Then

[tbAdditionCharge] Is Null or [tbAdditionCharge] = ""

Then
[tbAdditionChargeAmount] > 0

And finally

([tbAdditionCharge] Is Null or [tbAdditionCharge] = "") And
[tbAdditionChargeAmount] > 0


John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Bob Vance wrote:
> Thanks John tbAdditionalCharge is Text
> tbAdditionChargeAmount is Currency
> Both are record source is a table
> I am using Expression Is
> With your code I am getting Invalid Syntax you must enclose your text data
> in Quotes
> Thanks Bob
>
> "John Spencer" <spencer(a)chpdm.edu> wrote in message
> news:uKjCHUazKHA.1796(a)TK2MSFTNGP02.phx.gbl...
>> Just want to confirm you used
>> Expression Is
>> and then entered
>> [tbAdditionCharge] Is Null And [tbAdditionChargeAmount],0 > 0
>> and both fields (not controls) are available in the record source of the
>> form or report.
>>
>> What field type is tbAdditionCharge? If it is a text field it is possible
>> that it contains a zero-length string instead of null. You might try
>> ([tbAdditionCharge] Is Null or [tbAdditionCharge] = "") And
>> [tbAdditionChargeAmount],0 > 0
>>
>> John Spencer
>> Access MVP 2002-2005, 2007-2010
>> The Hilltop Institute
>> University of Maryland Baltimore County
>>
>> Bob Vance wrote:
>>> Thanks Sylvain, but neither code worked of yours , I looked at my first
>>> post and it is correctly worded, if tbAdditionCharge is null and
>>> tbadditionChargeAmount is more than 0 condition to make background "Red"
>>> of tbAdditionCharge
>>> Thanks Bob
>
>
From: Bob Vance on
No Error John, But does not change conditioning

This what I have in tbAdditionChargeAmount that works fine!



[tbAdditionChargeAmount]="0" And Not IsNull([tbAdditionCharge])



May be I should look to not saving record if tbAdditionCharge is Null and
tbAdditionChargeAmount is >0 ????

Regards Bob



"John Spencer" <spencer(a)chpdm.edu> wrote in message
news:e9d1HpfzKHA.6140(a)TK2MSFTNGP05.phx.gbl...
> That is strange. I'm not at all sure what that error message is saying.
> Since if you entered it as I posted it the only thing that could be
> interpreted would be the two quote marks. I am assuming you didn't
> attempt to enter four single quotes or leave off the brackets around the
> field names.
>
> I just tested the following expression on one of my sample databases and
> it behaves as expected and I am not getting any error (Access 2003).
>
> [fLink] Is Null Or [fLink]=""
>
> I did notice that somehow what I posted seems to have a Picked up an extra
> comma and zero. What I meant to post was the following (all on one line)
>
> ([tbAdditionCharge] Is Null or [tbAdditionCharge] = "") And
> [tbAdditionChargeAmount] > 0
>
> You might try testing out the conditional formatting by putting in just
> one of the comparisons and see if that works. If it does add another.
>
> Try
> [tbAdditionCharge] Is Null
>
> Then
>
> [tbAdditionCharge] Is Null or [tbAdditionCharge] = ""
>
> Then
> [tbAdditionChargeAmount] > 0
>
> And finally
>
> ([tbAdditionCharge] Is Null or [tbAdditionCharge] = "") And
> [tbAdditionChargeAmount] > 0
>
>
> John Spencer
> Access MVP 2002-2005, 2007-2010
> The Hilltop Institute
> University of Maryland Baltimore County
>
> Bob Vance wrote:
>> Thanks John tbAdditionalCharge is Text
>> tbAdditionChargeAmount is Currency
>> Both are record source is a table
>> I am using Expression Is
>> With your code I am getting Invalid Syntax you must enclose your text
>> data in Quotes
>> Thanks Bob
>>
>> "John Spencer" <spencer(a)chpdm.edu> wrote in message
>> news:uKjCHUazKHA.1796(a)TK2MSFTNGP02.phx.gbl...
>>> Just want to confirm you used
>>> Expression Is
>>> and then entered
>>> [tbAdditionCharge] Is Null And [tbAdditionChargeAmount],0 > 0
>>> and both fields (not controls) are available in the record source of the
>>> form or report.
>>>
>>> What field type is tbAdditionCharge? If it is a text field it is
>>> possible that it contains a zero-length string instead of null. You
>>> might try
>>> ([tbAdditionCharge] Is Null or [tbAdditionCharge] = "") And
>>> [tbAdditionChargeAmount],0 > 0
>>>
>>> John Spencer
>>> Access MVP 2002-2005, 2007-2010
>>> The Hilltop Institute
>>> University of Maryland Baltimore County
>>>
>>> Bob Vance wrote:
>>>> Thanks Sylvain, but neither code worked of yours , I looked at my first
>>>> post and it is correctly worded, if tbAdditionCharge is null and
>>>> tbadditionChargeAmount is more than 0 condition to make background
>>>> "Red" of tbAdditionCharge
>>>> Thanks Bob
>>

From: John Spencer on
Is tbAdditionChargeAmount a number field or a text field? Your posted
condition indicates that it is a text field (="0").

I can't figure out why you are having the problem with conditional formatting.
Perhaps the form/report has some slight corruption.

Have you tried to decompile the database?

You can use the decompile method to attempt a fix.

Check out the articles at:

http://www.trigeminal.com/usenet/usenet004.asp

http://www.mvps.org/access/bugs/bugs0008.htm

They are written for Access97 (the same method works for Access2000 and
Access2002, 2003, and I believe for 2007).

Be sure to MAKE A COPY of your mdb before you decompile. I've never had any
trouble but . . .

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Bob Vance wrote:
> No Error John, But does not change conditioning
>
> This what I have in tbAdditionChargeAmount that works fine!
>
>
>
> [tbAdditionChargeAmount]="0" And Not IsNull([tbAdditionCharge])
>
>
>
> May be I should look to not saving record if tbAdditionCharge is Null and
> tbAdditionChargeAmount is >0 ????
>
> Regards Bob
>
From: Bob Vance on
John I think you are getting the 2 text boxes mixed up tbAdditionCharge is
Text field and tbAdditionAmount is Currency
The example I posted was in the other text box that works fine
Regards Bob, I have compiled!

"John Spencer" <spencer(a)chpdm.edu> wrote in message
news:u7chqXpzKHA.2512(a)TK2MSFTNGP05.phx.gbl...
> Is tbAdditionChargeAmount a number field or a text field? Your posted
> condition indicates that it is a text field (="0").
>
> I can't figure out why you are having the problem with conditional
> formatting. Perhaps the form/report has some slight corruption.
>
> Have you tried to decompile the database?
>
> You can use the decompile method to attempt a fix.
>
> Check out the articles at:
>
> http://www.trigeminal.com/usenet/usenet004.asp
>
> http://www.mvps.org/access/bugs/bugs0008.htm
>
> They are written for Access97 (the same method works for Access2000 and
> Access2002, 2003, and I believe for 2007).
>
> Be sure to MAKE A COPY of your mdb before you decompile. I've never had
> any trouble but . . .
>
> John Spencer
> Access MVP 2002-2005, 2007-2010
> The Hilltop Institute
> University of Maryland Baltimore County
>
> Bob Vance wrote:
>> No Error John, But does not change conditioning
>>
>> This what I have in tbAdditionChargeAmount that works fine!
>>
>>
>>
>> [tbAdditionChargeAmount]="0" And Not IsNull([tbAdditionCharge])
>>
>>
>>
>> May be I should look to not saving record if tbAdditionCharge is Null and
>> tbAdditionChargeAmount is >0 ????
>>
>> Regards Bob
>>


First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: how to increase the speed for large datasets?
Next: hi jt