change fore color for a cell

  • Thread starter Thread starter retep
  • Start date Start date
R

retep

Thank you all for reading this message.

I have a invoice consist of the form with the subform. Like any
standard invoice, the form contains of the customer and the customer
information while the subform consists of the products, cases,
quantity, unit price and amount.

When the user enters a product, if the particular customer have not
purchased the particular product, I would like to have the fore color
of the unit price of that particular entry change to red. If not, the
unit price stays at black. Right now, once the user enter a product
that is not purchased by that particular customer, I change all the
unit prices on the subform to red color.

The code is use is

Me![OrderDetail.Unit Price].ForeColor = RGB(255, 0, 0)

How can I just restrict the change of the color of the unit price to
the product that I'm entering. Thank you.

retep
 
Use Conditional Formatting in Access 2000 or later. Select the textbox in
Design View and choose Format ... Conditional Formatting from the menubar.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

retep said:
Thank you all for reading this message.

I have a invoice consist of the form with the subform. Like any
standard invoice, the form contains of the customer and the customer
information while the subform consists of the products, cases,
quantity, unit price and amount.

When the user enters a product, if the particular customer have not
purchased the particular product, I would like to have the fore color
of the unit price of that particular entry change to red. If not, the
unit price stays at black. Right now, once the user enter a product
that is not purchased by that particular customer, I change all the
unit prices on the subform to red color.

The code is use is

Me![OrderDetail.Unit Price].ForeColor = RGB(255, 0, 0)

How can I just restrict the change of the color of the unit price to
the product that I'm entering. Thank you.

retep
 
use the conditional formatting from the format menu to accomplish this. set
the condition the same way you currently do.
THT
 
Back
Top