Conditional Formatting of Controls in a subform

G

Guest

Hi Folks

My clients app has a booking form (frmBookingEdit), with a subform showing
the names of all people on the booking (frmCabinAllocationSF).
As part of the main form, there is a combo box (cboBookingCust) showing the
name of the "Booking Customer", who is the person to whom correspondence is
sent. The rowsource for the combo box includes the customer's ID, which is
the bound control.
The subform is presented as a datasheet, and includes the customers Ids and
names.
I am trying to use conditional formatting to have the booking customer's
name highlighted in red in the subform.
I tried setting the conditional format for the name control on the subform
as follows

Condition1
Expression is
Forms!frmBookingEdit!frmCabinAllocationSF.Controls("CustomerRef")=Forms!frmBookingEdit!cboBookingCust

and then choosing to have the forecolor in red.

Its not working.

Can anyone tell me where I am going wrong?

Many thanks.

Arthur Ross
 
W

Wayne Morgan

Are you doing this by right clicking the control on the subform and choosing
Conditional Formatting? If so, try this expression:

[CustomerRef]=[Parent]![cboBookingCust]
 

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