Continuous forms problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • grahamib
    New Member
    • Nov 2009
    • 4

    Continuous forms problem

    I have a form running in access 2003. The forms property is set to continuous forms so that all records from an underlying query can be diaplayed. On the form are 12 sets of fields from [ Date1,Payment1, Type1].......to..... [Date12,Payment1 2,Type12] In the header of the form is a single unbound field that is populated with a date picker and a command button. The idea is that when a date is entered in the unbound field and the command button is pressed there is a graphical view [ie border colours change etc]of the status of payments ie [over due = red border etc] i have the code working but it works across all forms in the continuous forms view does anybody know how i can have the code work on each individual form that is displayed
    Thank you
    Grahamib
  • Megalog
    Recognized Expert Contributor
    • Sep 2007
    • 378

    #2
    Any properties set to those fields will be repeated throughout all the records in a continuous form. What you need to do is set conditional formatting rules on the fields you want to format.

    An example that would be applied to the Date1 field would be:

    Expression is [Date1] < [DatePickerField] (Format for a red fill color)

    This formatting would only show up on the records that Date1 is overdue (the date is prior to the one selected on the top of the form).

    Comment

    • grahamib
      New Member
      • Nov 2009
      • 4

      #3
      Many thanks for the help i have applied cond formating and for three of the con ditions it works fine. Unfortunatly i have a fourth condition.
      Is it possible to write code in the "Expression is" box to achieve the following
      [Date1]<{Datepicker]&[chk1]=False
      [chk1] being a check box denoting weather an account is paid or not

      Perhaps i shoud have explaind my objectives more clearly
      I have 4 conditions to satisfy these being:

      1 Future date = blue back colour
      2 Current date = Green back colour
      3 Past date = Red back colour

      These work fine in conditional formating howevwer i have a check box [chk1] that donates that a payment has been made and i need a condition to reflect this even if its no formating.

      Many Thanks

      Grahamib

      Comment

      • grahamib
        New Member
        • Nov 2009
        • 4

        #4
        HI
        Thank you for pointing me in the right direction. I Have managed a work around.
        I have created a text box default value "Paid" and formatted it to the [chk1] state.
        When true the background is Green
        When false the bacground and font are the same colour as the page detail (it can not be seen)
        Thank you once again the whole page looks and works like a dream

        Grahamib

        Comment

        • Megalog
          Recognized Expert Contributor
          • Sep 2007
          • 378

          #5
          Glad you got it working Grahamib, and sorry I didnt get back to you sooner.

          To answer your last question, yes you can add a boolean test into the conditional formatting equation. It would basically be: [Date1]<{Datepicker] AND [chk1]=False

          But you'll still be limited to only 3 conditions (at least until Access 2010). So you could add the boolean test to your 3 conditions, and it would require that a payment wasnt made for the conditions to take effect, otherwise if it was paid it would be whatever the default color for the field is.

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            Just as a reminder, Conditional Formatting allows for three conditions plus a fourth Default Format, which sometimes, though not always, surfices.

            Linq ;0)>

            Comment

            Working...