Results 1 to 7 of 7
  1. #1
    mamister is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    2

    Just a simple question.

    Hi all,



    i have table1:


    1231
    1232
    1233
    1234
    1235
    1236


    I have table2:


    1231
    1232
    1233


    So i want to create table3 to only show:


    1234
    1235
    1236


    How shall i do that?

    Thanks.

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Your example shows that table2 only contains matching records. If this is the case - if there are no items on table2 that do not have a matching item on table1 - then it is a simple left join. In a new query, join the two tables by the item. Then right-click on the join line and select the option for all records from table1 and only those on table2 which match. If there can be items on table2 without a match on table1, then it must be handled differently.

  3. #3
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Yep sounds like he wants ones from table1 that do not match. So do same as aytee11 said but in query, add fields from both tables and in column criteria of table2 field, put: Is Null

  4. #4
    mamister is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    2
    Hi,

    Thanks for the help, now i have the query results, can i insert a autocount ID into that?

    Thanks.

  5. #5
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    What do you mean by that? If the field already exists on a table then yes. A query cannot create an autonumber field.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    A query can use DCount() domain aggregate function to calculate a sequential value. However, domain aggregate functions can cause slow performance. Textbox on report can calculate the sequential ID with RunningSum property.

    What exactly do you need this for?
    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.

  7. #7
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    But it won't start with 1 because the records with Null values are missing?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. If and Else - very simple question
    By tygereye in forum Access
    Replies: 38
    Last Post: 04-02-2014, 06:06 AM
  2. Simple question
    By M.West in forum Database Design
    Replies: 2
    Last Post: 08-16-2012, 12:41 AM
  3. Simple VBA Question
    By koper in forum Access
    Replies: 1
    Last Post: 01-20-2011, 12:07 PM
  4. Simple question
    By KenM in forum Queries
    Replies: 1
    Last Post: 11-10-2009, 03:32 PM
  5. Simple question?
    By roads.zx in forum Access
    Replies: 0
    Last Post: 10-15-2009, 04:56 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