Accessing field lable name for conditional formatting

G

Guest

Field is Text Box: D17
Name is D17
Control Source is D17

Lable name is L17
Lable caption is D17

I am trying to put conditional formatting on Field [D17] to make the text
box grey if the the number portion of the field name falls within a range of
two other calculated fields in that record.

I have tried the following with no results:

If(Mid([L17].[Caption],2,2)>=[RangeMin] And
IF(Mid([L17].[Caption],2,2)<=[RangeMax])) .... then apply formatting

I can get this formula to work within the form:

=IIf(Mid(L17.Caption,2,2)>=[RangeMin] And
(Mid(L17.Caption,2,2)<=[RangeMax]),"In range","out of range")

Any ideas?
 
G

Guest

Sandy said:
Field is Text Box: D17
Name is D17
Control Source is D17

Lable name is L17
Lable caption is D17

I am trying to put conditional formatting on Field [D17] to make the text
box grey if the the number portion of the field name falls within a range of
two other calculated fields in that record.

I have tried the following with no results:

If(Mid([L17].[Caption],2,2)>=[RangeMin] And
IF(Mid([L17].[Caption],2,2)<=[RangeMax])) .... then apply formatting

I can get this formula to work within the form:

=IIf(Mid(L17.Caption,2,2)>=[RangeMin] And
(Mid(L17.Caption,2,2)<=[RangeMax]),"In range","out of range")

Any ideas?

How about :
Me!D17. Backcolor=IIf(Mid(L17.Caption,2,2)>=[RangeMin] And
(Mid(L17.Caption,2,2)<=[RangeMax]),128,255)
 
G

Guest

Sounds good, but where do I put this code??

Andy6 said:
Sandy said:
Field is Text Box: D17
Name is D17
Control Source is D17

Lable name is L17
Lable caption is D17

I am trying to put conditional formatting on Field [D17] to make the text
box grey if the the number portion of the field name falls within a range of
two other calculated fields in that record.

I have tried the following with no results:

If(Mid([L17].[Caption],2,2)>=[RangeMin] And
IF(Mid([L17].[Caption],2,2)<=[RangeMax])) .... then apply formatting

I can get this formula to work within the form:

=IIf(Mid(L17.Caption,2,2)>=[RangeMin] And
(Mid(L17.Caption,2,2)<=[RangeMax]),"In range","out of range")

Any ideas?

How about :
Me!D17. Backcolor=IIf(Mid(L17.Caption,2,2)>=[RangeMin] And
(Mid(L17.Caption,2,2)<=[RangeMax]),128,255)
 
G

Guest

You Said:
I can get this formula to work within the form:

=IIf(Mid(L17.Caption,2,2)>=[RangeMin] And
(Mid(L17.Caption,2,2)<=[RangeMax]),"In range","out of range")

What action happened to make this formula work?
Can you use the same action?
If Not then try the after Update/on exit event of one of your input controls
or any event that can trigger the formula, or click event in 'Detail Section'
or even Mouse over 'Detail Section' will get it every time.
Andy ******************


Sandy said:
Sounds good, but where do I put this code??

:

How about :
Me!D17. Backcolor=IIf(Mid(L17.Caption,2,2)>=[RangeMin] And
(Mid(L17.Caption,2,2)<=[RangeMax]),128,255)
 

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