Results 1 to 4 of 4
  1. #1
    Khalil Handal is offline Competent Performer
    Windows 10 Access 2003
    Join Date
    Jun 2016
    Posts
    242

    Agregation function - where clause

    Hi,
    I have a table with 42000 records, I want to edit some records based on the following condition: count of a field1 is < 2.
    My form will display only the records that has the condition (the count <2) so that I can edit these records.
    Is there a way?
    I am using access 2010 .mdb file



    Khalil

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    are you comfortable creating the query to count it?

  3. #3
    Khalil Handal is offline Competent Performer
    Windows 10 Access 2003
    Join Date
    Jun 2016
    Posts
    242
    Hi,
    What I am actually doing is cleaning the data in a flat database in order to migrate it to a relational database.
    Some fields are repeated 89 times in 89 different records, so I create an update query to edit this field.
    There fields having only one occurrence in one record only. What I was thinking of is to have query showing only the records that has one occurrence for a specif field , build a form in datasheet view based on this query to enable me to edit these records.

    Khalil

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Create a Find Duplicates query using the wizard, select only field1. It will show all records with field1 having a count >1. Change the criteria to say =1 instead.

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

Similar Threads

  1. SQL WHERE clause with an AND in VBA
    By CharissaBelle in forum Forms
    Replies: 3
    Last Post: 04-14-2016, 04:29 PM
  2. Max within a where clause
    By kdayboll in forum Queries
    Replies: 2
    Last Post: 09-14-2013, 12:13 PM
  3. Not In Clause
    By dukect in forum Queries
    Replies: 10
    Last Post: 08-29-2011, 04:55 PM
  4. Using the TOP clause
    By WSlepecki in forum Queries
    Replies: 1
    Last Post: 04-08-2011, 06:59 AM
  5. Help on WHERE clause
    By QBCM in forum Programming
    Replies: 1
    Last Post: 12-19-2005, 08:43 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