Results 1 to 5 of 5
  1. #1
    Linda1234 is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    2

    checking records

    Hi,



    I have a query displays all the paking results.

    I need to check if the name field in first record is equal to the name in the second record or third record ... same as the date field. if they are equal, I will update another column to mark it. We only charge once in one day, it does not matter how many times you are in/out.

    anyone please help me.

    thanks,
    Linda

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    You could view the records on a form and then mark as appropriate.

    Otherwise, use code to count records to determine if the value exists more than once. Can use DCount function. Having code do the update for you is tricky.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    What about using the "Find duplicates" query wizard??

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    I think only one table is involved.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Hmmmm. I did a test with the find duplicates wizard using one table..... seemed to work. Tried with one field, then with two fields... seemed to work.
    Should work with Name and date fields (Name and date are bad field names if they are in fact the field names. "Name" and "Date" are reserved words in Access)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Which is better? checking in VBA or SQL
    By allstar45 in forum Queries
    Replies: 1
    Last Post: 02-17-2012, 12:13 PM
  2. Automatically checking a box?
    By Delta223 in forum Access
    Replies: 3
    Last Post: 01-10-2011, 10:37 PM
  3. Checking a table for changes
    By Rando in forum Queries
    Replies: 2
    Last Post: 10-07-2010, 09:25 AM
  4. checking existence of records
    By akbigcat86 in forum Programming
    Replies: 6
    Last Post: 07-20-2010, 02:45 PM
  5. Checking for Value in Query
    By jgelpi in forum Access
    Replies: 1
    Last Post: 06-24-2009, 04:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums