Conditional Formatting

M

magmike

I'm trying to use an If Statement in the OnCurrent event of a form to
determine if the current record (based on [ID] field), has a record in
the table [Status], where the field [statuscode] in that record of the
other table (if any related records exist) equals the number 21, and
then make an unbound field visible if so, or keep it not visible if
not. However, I can't quite figure out how to write it.

The goal here, is to present a warning to the user, that this prospect
belongs to someone else (code 21) if true.

NOTE: there is a subform on this form that shows all the status
records in the status table that relate to this record. I can't use
the conditional formatting feature in that subform though, as since it
is a continuous form, it will apply the formatting to all the records
showing in the subform. The user may not think to look at the status
form everytime, before moving forward with the prospect, so having an
unbound field showup with loud formatting (bold, red for example) will
help show this warning as well as others. Of course, I'm open to other
ideas if you have any.

By the way - is there a way to make that unbound field blink?

Thanks in advance for your help,
magmike
 
J

John W. Vinson

I'm trying to use an If Statement in the OnCurrent event of a form to
determine if the current record (based on [ID] field), has a record in
the table [Status], where the field [statuscode] in that record of the
other table (if any related records exist) equals the number 21, and
then make an unbound field visible if so, or keep it not visible if
not. However, I can't quite figure out how to write it.

The goal here, is to present a warning to the user, that this prospect
belongs to someone else (code 21) if true.

NOTE: there is a subform on this form that shows all the status
records in the status table that relate to this record. I can't use
the conditional formatting feature in that subform though, as since it
is a continuous form, it will apply the formatting to all the records
showing in the subform. The user may not think to look at the status
form everytime, before moving forward with the prospect, so having an
unbound field showup with loud formatting (bold, red for example) will
help show this warning as well as others. Of course, I'm open to other
ideas if you have any.

By the way - is there a way to make that unbound field blink?

Thanks in advance for your help,
magmike

What version of Access are you using? If it's 2002 or later, use the exact
feature in your subject line: conditional formatting. Select a textbox (or
more than one if you wish), and choose Format... Conditional Formatting from
the menu. You can set a condition on the basis of the value of the field bound
to that textbox, or you can use any expression (such as a DLookUp call).

Post back if you have an earlier version - it's doable but a bit more work.
 

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