Conditional format continuous form field

G

Guest

I want to be able to conditionally disable a field in a record of a
continuous form. I see where it can be done with "conditional formatting" on
the "format" menu tab. However, the data becomes difficult to read when it is
disabled. Can I change the background color or font color to make it more
readable?
 
K

kingston via AccessMonster.com

Will making the text bold help? You can do this in the conditional
formatting dialog box. Otherwise, you'll have to write a procedure to check
for the condition, dis/enable the control, and set the formatting.
 
G

Guest

Bolding it will help. However, space on the form is at a premium and bolding
the field means that some of the text cannot be read because it goes past the
end of the field. What I really want to be able to do is to conditionally set
the enabled, locked, tabstop and backstyle flags on a field in a record on a
continuous form. Can you show me the code for the procedure to do this?
 
K

kingston via AccessMonster.com

Actually, you can use conditional formatting to change the way the control
looks for all records and then use the OnCurrent event to lock the control as
needed. The code would be attached to the form's OnCurrent event to restrict
access tot he particular control:

If Me.Control1 = Criteria Then
Me.Control2.Locked = True
Me.Control2.TabStop =...
Else
Me.Control2.Locked = False
...
End If

If you lock the field, you don't need to disable it; so leave that out.
Bolding it will help. However, space on the form is at a premium and bolding
the field means that some of the text cannot be read because it goes past the
end of the field. What I really want to be able to do is to conditionally set
the enabled, locked, tabstop and backstyle flags on a field in a record on a
continuous form. Can you show me the code for the procedure to do this?
Will making the text bold help? You can do this in the conditional
formatting dialog box. Otherwise, you'll have to write a procedure to check
[quoted text clipped - 5 lines]
 

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