Asterisk appearing in table box when doing query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Karen Oswald

    Asterisk appearing in table box when doing query

    I have a database that keeps track of art illustrations. I have relationships created between tables. One table that appears in my relationship is the Artist table and here is how it appears on the relationship screen

    Artist
    ID (primary key)
    ArtistFirstName
    ArtistLastName

    However, when I go to do a query using the Query Design function and place that table it appears this way

    Artist
    *
    ID (primary key)
    ArtistFirstName
    ArtistLastName

    I don't know what makes the asterisk appear on the Query Design screen. When I try to run the query, I get a message saying...

    "The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect."

    I don't know if the asterisk is what is causing this message. The other two tables are OriginalArtist

    OriginalArtist
    *
    ArtistID (Foreign Key)
    ImageID (Foreign Key)
    ID (Primary Key)

    And

    Images
    *
    Reg Number (Primary Key)
    ...
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1288

    #2
    The * simply is an indicator meaning "all the columns belonging to this table." You could drag the star down to the grid and it would add all the table's columns to that query.

    You can get the sql code for the query by right-clicking on the top of the query and choosing "SQL view". Copy and paste that code here and someone can help you solve the problem.

    Or, to do it yourself, try eliminating one column at a time from the query until the error goes away. Then go back to original query and take a closer look at the column making the problem.

    Jim

    Comment

    • mshmyob
      Recognized Expert Contributor
      • Jan 2008
      • 903

      #3
      Could it be because "Number" is a reserved word. I would have assumed Access would have wrapped her PK in square brackets using the query design but you never know.

      Post your actual SQL query that the query designer made and maybe we can spot it there.

      cheers,

      Comment

      • mshmyob
        Recognized Expert Contributor
        • Jan 2008
        • 903

        #4
        As an after thought. Is that table actually called "Images" or "Image".

        If it is actually called "Image" that is an Access database engine reserved word.

        cheers,

        Comment

        Working...