Results 1 to 4 of 4
  1. #1
    dominover is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    11

    Access SQL Question?

    Can anyone tell me what is wrong with this statement.



    Code:
    SELECT [Table2].[Field2], WHERE [Table2].[ID] = [TABLE1].[ID];
    Access tells me there's a syntax error and I'm not sure what rule I've broken despite obsessive googling.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    make the query using the visual query design; dragging the tables in, making the join line, and adding the field - - run it so it returns the record set that is correct.... then select 'SQL View' this is the certain way to answer your question

  3. #3
    jeffatwork is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2016
    Posts
    3
    I believe you are are missing the "From" and some parenthesis

    SELECT Table2.Field2
    FROM Table1, Table2
    WHERE (((Table2.id)=[Table1].[ID]));

  4. #4
    dominover is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    11
    Thanks both. It was the FROM that was missing. Works fine now.

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

Similar Threads

  1. Not an Access Question
    By MaineLady in forum Access
    Replies: 0
    Last Post: 03-14-2015, 01:50 PM
  2. Replies: 4
    Last Post: 12-14-2013, 06:20 PM
  3. Converting Access Backend from Access 2003 to SQL Question
    By seattlebrew in forum Database Design
    Replies: 0
    Last Post: 03-07-2013, 07:14 PM
  4. Hello and web access question
    By jtiii in forum Access
    Replies: 2
    Last Post: 03-15-2011, 08:38 AM
  5. Access Question!
    By gn987654 in forum Access
    Replies: 1
    Last Post: 12-10-2008, 03:30 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