Results 1 to 8 of 8
  1. #1
    cwillson is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    17

    Access 2010 UNION * from two tables (with the same column names) asking for parameter value

    I am TOTALLY flummoxed with this one...

    I have two tables. Both have the same number of columns, and the column names are exactly the same.

    I'm trying to use a UNION query to combine them, which has worked previously, but now I keep getting the error "Enter parameter value: Query2.Legacy_ID_Article"!!

    How can it be asking for this when there isn't a table called Query2, and the UNION is definitely referencing the two names tables (not another query)?

    Please help!!!

  2. #2
    cwillson is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    17
    UNION query is as follows (in case I am missing something obvious!):

    SELECT * FROM ANB_AC_CMS_S1
    UNION SELECT * FROM CMS_MULTIPLE_SUBJECT_AC_CORRECTIONS;

    I've checked and double checked the two tables for differences, but apart from the values (which I am trying to combine) everything is the same....

  3. #3
    cwillson is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    17
    Weirdly, when I run a subsequent macro, which creates a new table from the results of the above UNION query, then deletes a column that's not required in the resultant table, it runs without the "Enter parameter value" error????

    Macro uses this query (ANB_AC_UNION being the UNION query with the issue above when being run in isolation):

    SELECT * INTO ANB_AC_FINAL FROM ANB_AC_UNION

    Totally and utterly lost with this now.....need....help....

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    What happens if you explicitly list the field names in the query instead of using *?

  5. #5
    cwillson is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    17
    same thing

    I've saved a copy of the DB, used Compact/Repair, and still no joy....

  6. #6
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Are these linked tables, or are the queries stored directly in your Access database?
    If linked, are we sure that these aren't actually linked to queries/views in the system they are coming from?

    Just for kicks, have you tried re-creating your Union Query from scratch in a new Query (just to make sure there isn't something flaky saved in the one you were working on)?

  7. #7
    cwillson is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    17
    I tried deleting and recreating the query.....


    ....and it worked like a charm!!! Thank you , thank you, thank you!!

    Would still love to know what had happened, but perhaps life is too short! haha

  8. #8
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome!

    Sometimes, an underlying setting might get changed or even corruption.

    So when all else fails, try recreating it (the equivalent of a "reboot"!)

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

Similar Threads

  1. Replies: 1
    Last Post: 10-16-2014, 10:36 PM
  2. Replies: 3
    Last Post: 02-26-2014, 03:21 PM
  3. Replies: 1
    Last Post: 11-12-2013, 02:19 AM
  4. Replies: 3
    Last Post: 04-05-2013, 10:40 PM
  5. Replies: 5
    Last Post: 04-24-2011, 03:14 AM

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