Conditional Formatting

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?
 
F

fredg

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.
 
T

tankerman

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.
 

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