Results 1 to 6 of 6
  1. #1
    KLynch0803 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    37

    Error 3075 Missing Operator

    I keep getting a Missing operator error in access 2007



    Error 3075: Syntax Error (missing operator) in query expression '[citystate] - abbeville LA'

    To me it appears that I'm not grabbing the first variable in the comparison but I'm just not sure where my error is.. Can someone please show me what i got wrong?

    Here is my query sql code

    Code:
     
    SELECT query2.citystate, ConcatRelated("zipcode","query2","[citystate] = " & [citystate])
    FROM query2;
    Here is where I found help on the function I'm trying to perform..
    http://allenbrowne.com/func-concat.html

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try:
    Code:
    SELECT query2.citystate, _
    ConcatRelated("zipcode","query2","[citystate] = '" & [citystate] & "'" ) _
    FROM query2;

  3. #3
    KLynch0803 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    37
    Quote Originally Posted by RuralGuy View Post
    Try:
    Code:
    SELECT query2.citystate, _
    ConcatRelated("zipcode","query2","[citystate] = '" & [citystate] & "'" ) _
    FROM query2;
    TY for the reply RuralGuy...

    Unfortunately I'm still getting Syntax error in query expression ConcatRelated("zipcode","query2","[citystate] = '" & [citystate] & "'" ) _

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is the CityState field a string or numeric field? Try renaming your bound control to txtCityState and then change the SQL to:
    SELECT query2.citystate, ConcatRelated("zipcode","query2","[citystate] = '" & Me.txtcitystate & "'")
    FROM query2;

  5. #5
    KLynch0803 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    37
    Quote Originally Posted by RuralGuy View Post
    Is the CityState field a string or numeric field? Try renaming your bound control to txtCityState and then change the SQL to:
    SELECT query2.citystate, ConcatRelated("zipcode","query2","[citystate] = '" & Me.txtcitystate & "'")
    FROM query2;

    It may be easier if you are seeing exactly what I'm trying to do..

    I have attached a sample db of mine.
    I'm trying to take tbl_city_zip and find all unique city/state's and concatrelated zipcode into a value in a query as such

    Raleigh NC 27615 27614 27613
    Cary NC 27564 276565 27566
    so on and so on

    Therefore I would only hae the city state listed once and all related zip codes on the end of it as one row...

    I was using query2 to create my list of city state values to add the related zipcode to.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    This one works but there are some issues you will need to deal with.

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

Similar Threads

  1. Probably missing something easy
    By z1efuller1 in forum Database Design
    Replies: 5
    Last Post: 11-12-2009, 11:18 AM
  2. Pass list as parameter to in operator
    By bliever in forum Queries
    Replies: 5
    Last Post: 11-11-2009, 03:15 AM
  3. Replies: 1
    Last Post: 10-07-2009, 07:36 AM
  4. Making the like operator work for fields
    By olidav911 in forum Queries
    Replies: 2
    Last Post: 06-06-2009, 01:57 AM
  5. Missing Operator error
    By data123 in forum Forms
    Replies: 1
    Last Post: 03-15-2009, 04:34 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