Results 1 to 5 of 5
  1. #1
    Huddle is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2010
    Posts
    318

    SQL error for invalid name

    I am getting the below error on my query. I can't see the error in the SQL. Please let me know if you can see why I am getting this error. When I run the query it runs fine.



    SELECT Tbl_WO_Log.WO_Bldg_Number, LookupQ_Building_Number.[FPS Building Name], LookupQ_Building_Number.[FPS Building Address], LookupQ_Building_Number.City, LookupQ_Building_Number.State, LookupQ_Building_Number.[Inspector Name], Tbl_WO_Log.WO_Number, Tbl_WO_Log.Alarm_Acct, Tbl_WO_Log.Asset_Number, Tbl_WO_Log.System, Tbl_WO_Log.Problem, Tbl_WO_Log.Leadership_Comments, Tbl_WO_Log.Initial_POC, Tbl_WO_Log.Initial_POC_Ph, Tbl_WO_Log.Log_Date, Tbl_WO_Log.Assigned_To, Tbl_WO_Log.Date_Resolved, Tbl_WO_Log.MIST_ID


    FROM Tbl_WO_Log LEFT JOIN LookupQ_Building_Number ON Tbl_WO_Log.WO_Bldg_Number = LookupQ_Building_Number.[Building Number]
    WHERE (((Tbl_WO_Log.Log_Date)=Date()) AND ((Tbl_WO_Log.Date_Resolved) Is Null));


  2. #2
    Huddle is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2010
    Posts
    318
    Click image for larger version. 

Name:	Untitled.png 
Views:	10 
Size:	16.1 KB 
ID:	46416 here is the error

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,522
    those ARE some long names. Try making each table its own query with small alias names:

    query: qsBldgInfo
    select * from tbl_Building_information as tBldInfo

    query: qsBldNum
    select * from LookupQ_Building_Number as tBldNum

    then join these smaller queries togther

  4. #4
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,002
    I think that error is in your linked query LookupQ_Building_Number , as those fields aren't in the query you have posted.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  5. #5
    Huddle is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2010
    Posts
    318
    That worked, Thanks

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

Similar Threads

  1. Replies: 3
    Last Post: 05-10-2018, 07:48 AM
  2. Replies: 3
    Last Post: 07-12-2017, 04:29 PM
  3. VBA Error: Invalid Bracketing of Name
    By kawi6rr in forum Programming
    Replies: 3
    Last Post: 02-21-2013, 05:26 PM
  4. Error 94: Invalid Use of Null
    By athomas8251 in forum Forms
    Replies: 3
    Last Post: 11-09-2011, 11:46 AM
  5. Invalid Argument Error
    By koper in forum Access
    Replies: 2
    Last Post: 06-14-2010, 11:22 AM

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