Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Differentiate Between Multiple Records (2000)

    Hi,

    We have a table called tblValuation and a form called frmValuations

    What we want to do is have an on current event that enables us to compare two fields PROPNUMR and Streetname. I want to be able to see if there are more than one record that matches the current one displayed on the screen. If so so and this is not the last one in the table (based on the ValuationID field, which is an autonumber field) then the field would be red, if it is the last one in table, then they would be green. Then if there was only match for the criteria, it would be the usualy white background to the text fields.

    Any ideas?
    Best Regards,

    Luke

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

    Re: Differentiate Between Multiple Records (2000)

    You can do this using Conditional Formatting. Set the first dropdown to Expression is and use a formula like this:

    DCount("*";"tblValuation";"PropNumr=" & [PropNumr] & " AND StreetName='" & [StreetName] & "'")>1 AND [ValuationID]<DMax("ValuationID";"tblValuation")

    for the red color, and another condition with

    DCount("*";"tblValuation";"PropNumr=" & [PropNumr] & " AND StreetName='" & [StreetName] & "'")>1 AND [ValuationID]<DMax("ValuationID";"tblValuation")

    for the green color. See the attached sample database.

Posting Permissions

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