Results 1 to 2 of 2
  1. #1
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156

    Go to search

    Good day all. I have a really strange situation happening here. I am trying to insert a go to search or go to combo box in some forms. They are all working except for one.



    I put the below code number (1) in




    (1) SELECT [ID], [Movie Title] FROM MovieCollection WHERE [ID]<>Nz(Form![ID],0) ORDER BY [Movie Title];

    And when I save the form it changes it to code number (2) and it will not work. It keeps sticking the word "AS" between the words "Movie AS Collection" The name of the table is "Movie Collection" not "Movie AS Collection". Its pissing me off.


    (2) SELECT [ID], [Movie Title] FROM Movie ASCollection WHERE [ID]<>Nz(Form![ID],0) ORDER BY [Movie Title];






  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You shouldn't have spaces in object names.

    Try
    Code:
    SELECT [ID], [Movie Title] FROM [Movie Collection] WHERE [ID]<>Nz(Form![ID],0) ORDER BY [Movie Title];
    Note the brackets around "Movie Collection". If you have spaces in a name, you must enclose the name with brackets..

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

Similar Threads

  1. Replies: 8
    Last Post: 09-02-2015, 03:00 PM
  2. Replies: 1
    Last Post: 03-26-2015, 11:08 AM
  3. Replies: 3
    Last Post: 01-04-2015, 06:09 PM
  4. Replies: 3
    Last Post: 09-02-2013, 04:33 PM
  5. Replies: 7
    Last Post: 08-08-2012, 03:28 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