Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Dec 2006
    Posts
    250
    Thanks
    0
    Thanked 0 Times in 0 Posts

    conditional formatting a field (2003)

    Hello,

    I have a form with a subform on it. In the main form there is a field "Invoicetotal" where the user puts in the total amount for the invoice. The user then goes to the subform to enter the detail information for the "Invoicetotal" field. I created in the footer of the subform a field call "Subtotal". It has the sum of a field call "InvoiceDetail" this is where the user breaksdown the amounts. I want to set the "Subtotal" field with a conditional format that if the total is not the same as amount enter in the "Invoicetotal" then to put the background red. How can I go about doing this or can anyone recommend a better way of doing this. Below is a example:

    Invoicetotal $500 field in the main form.

    Invoice detail -$100 personnel, $400 Indirect = subtotal field $500 (this is the field I would like to put the conditional format.

    Thanks.

    I

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: conditional formatting a field (2003)

    Select the Subtotal text box in the footer of the subform.
    Select Format | Conditional Formatting...
    Click in the second dropdown in Condition 1 and select "Not equal to".
    Click in the box next to it and enter the expression

    [Forms]![NameOfMainForm]![InvoiceTotal]

    substituting the actual name of the main form.
    Select the formatting you want to apply.
    Click OK.
    The formatting will be updated when the Subtotal is recalculated.
    Save the subform.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •