Results 1 to 8 of 8
  1. #1
    SAFE Program is offline Novice
    Windows 10 Access 2007
    Join Date
    Sep 2024
    Posts
    2

    Error Message when Trying to filter a query

    I have a query on diffrent hospital information. I want to just view the provided information on just one specific hospital but it gives me this error message: SINTAX ERROR (MISSING OPERATOR) IN QUERY EXPRESSION 'HOSPITAL NAME'



    This is the formula I have. [SELECT [SA Case Table].[Exam Date], [SA Case Table].[Case Type], [SA Case Table].[Patient Last Name], [SA Case Table].[Patient First Name], [SA Case Table].[Medical Record #], [SA Case Table].[Hospital Name], [SA Case Table].SANE
    FROM [SA Case Table];]


    If I try to pull the hospital name from the Hospital table I created I still get the same error message

    Formula:
    [SELECT [SA Case Table].[Exam Date], [SA Case Table].[Case Type], [SA Case Table].[Patient Last Name], [SA Case Table].[Patient First Name], [SA Case Table].[Medical Record #], [Hospital Lookup].[Hospital Name], [SA Case Table].SANE
    FROM [Hospital Lookup] INNER JOIN [SA Case Table] ON [Hospital Lookup].[Hospital ID] = [SA Case Table].Hospital;]

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,742
    And the error message is ????

  3. #3
    SAFE Program is offline Novice
    Windows 10 Access 2007
    Join Date
    Sep 2024
    Posts
    2
    sintax error (missing operator) in query expression 'hospital name'


  4. #4
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,205
    I think the problem is end the end of the query. You have a superfluous ] after the ;
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  5. #5
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,425
    It begins with [ as well? Never seen that before.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,205
    True. That should also be removed
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Remove spaces and special characters from names and brackets will not be needed.

    That outer bracket pair is definitely odd. Why are you using that?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,880
    Just a word of caution if your database concerns what I think it may, besides Hippa concerns, there are often court imposed protective orders governing the information too.
    Access is far from a secure platform.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

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

Similar Threads

  1. Replies: 4
    Last Post: 02-24-2018, 11:48 PM
  2. Replies: 7
    Last Post: 03-17-2016, 05:53 PM
  3. Replies: 11
    Last Post: 04-09-2014, 01:08 PM
  4. Replies: 14
    Last Post: 06-06-2012, 12:50 PM
  5. Replies: 11
    Last Post: 11-26-2010, 10:53 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