Conditional Formatting

  • Thread starter Thread starter tankerman
  • Start date Start date
T

tankerman

I have a form in my inventory db with the control [TxtOnHand] which has a
control source of
=OnHand([TxtItem],[Forms]![FrmDistribution]![TxtDistribution_Date]) and this
works fine, I have 2 hidden controls [txtLow_Stock] and [txtLow_Low_Stock]
which are hidden.

I tried this in conditional formatting on my [TxtOnHand] control

Expression is IF ([TxtOnHand] < [txtLow_Stock])
Expression is IF ([TxtOnHand] < [txtLow_Low_Stock])
and I set conditions for both.

The conditions I set for both do not work, I tried to use just one condition
and it still does not work. I would like it to be =< but when I put that in
it give me a syntax error.

What am I doing wrong, do I need to do this thru code?
 
I have a form in my inventory db with the control [TxtOnHand] which has a
control source of
=OnHand([TxtItem],[Forms]![FrmDistribution]![TxtDistribution_Date]) and this
works fine, I have 2 hidden controls [txtLow_Stock] and [txtLow_Low_Stock]
which are hidden.

I tried this in conditional formatting on my [TxtOnHand] control

Expression is IF ([TxtOnHand] < [txtLow_Stock])
Expression is IF ([TxtOnHand] < [txtLow_Low_Stock])
and I set conditions for both.

The conditions I set for both do not work, I tried to use just one condition
and it still does not work. I would like it to be =< but when I put that in
it give me a syntax error.

What am I doing wrong, do I need to do this thru code?

The expressions are not written correctly.
Do you wish 2 different colors for?

For the [txtOnhand] control
Condition1
Field Value Is
Less than
[txtLow_Stock]

Select your colors for condition1

Condition2
Field Value Is
Less than
[txtLow_Low_Stock]

Select your colors for Condition2

Assuming you wanted the same color for both conditions, you could use
Expression Is.
Condition1
Expression Is
[txtOnhand] < [TstLow_Stock] or [txtOnhand] < [txtLow_Low_Stock]

Select the colors.
 
Perfect, Thank you

fredg said:
I have a form in my inventory db with the control [TxtOnHand] which has a
control source of
=OnHand([TxtItem],[Forms]![FrmDistribution]![TxtDistribution_Date]) and this
works fine, I have 2 hidden controls [txtLow_Stock] and [txtLow_Low_Stock]
which are hidden.

I tried this in conditional formatting on my [TxtOnHand] control

Expression is IF ([TxtOnHand] < [txtLow_Stock])
Expression is IF ([TxtOnHand] < [txtLow_Low_Stock])
and I set conditions for both.

The conditions I set for both do not work, I tried to use just one condition
and it still does not work. I would like it to be =< but when I put that in
it give me a syntax error.

What am I doing wrong, do I need to do this thru code?

The expressions are not written correctly.
Do you wish 2 different colors for?

For the [txtOnhand] control
Condition1
Field Value Is
Less than
[txtLow_Stock]

Select your colors for condition1

Condition2
Field Value Is
Less than
[txtLow_Low_Stock]

Select your colors for Condition2

Assuming you wanted the same color for both conditions, you could use
Expression Is.
Condition1
Expression Is
[txtOnhand] < [TstLow_Stock] or [txtOnhand] < [txtLow_Low_Stock]

Select the colors.
 
Back
Top