Results 1 to 2 of 2
  1. #1
    BillE is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Location
    NZ
    Posts
    2

    Compile Error: Expected: list separator or ) with QueryDefs

    I have set up a query that runs ok. I want to be able to modify it dynamically in vba to use it as a subform.
    This is the code that produces the error.
    Code:
       Dim db As DAO.Database
       Dim qdf As DAO.QueryDef
       Dim strSQL As String
       Set db = CurrentDb()
       Set qdf = db.QueryDefs("qryGiftors”)
    The final line, Set qdf = db.QueryDefs("qryGiftors”), turns red when the the error message pops up.

    Compile Error: Expected: list separator or )

    When I call the routine from the form the error message is


    Compile Error: Syntax error

    I would be grateful if someone can explain to me what is going wrong.
    Last edited by BillE; 04-29-2016 at 01:31 AM. Reason: additional information

  2. #2
    BillE is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Location
    NZ
    Posts
    2
    Found the error.
    The final " in ("qryGiftors”) is of a different form to the first. It was copied from an example which is italicised. Making it match the first " has eliminated the error.

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

Similar Threads

  1. Compile Error: Expected: list separator or )
    By Voodeux2014 in forum Programming
    Replies: 11
    Last Post: 04-21-2015, 10:23 AM
  2. Compile Error: Expected: list separator or )
    By jabadoojr in forum SQL Server
    Replies: 6
    Last Post: 10-22-2013, 01:55 PM
  3. Compile error: Expected: list separator or )
    By ThatWumboGuy in forum Programming
    Replies: 2
    Last Post: 08-03-2013, 10:33 PM
  4. Compile Error: Expected: list separator or )
    By Kirsti in forum Programming
    Replies: 2
    Last Post: 03-27-2012, 02:52 PM
  5. compile error: expected end of statement
    By RedGoneWILD in forum Programming
    Replies: 5
    Last Post: 07-29-2010, 10:12 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