Results 1 to 2 of 2
  1. #1
    ALearner is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2022
    Posts
    1

    Syntax error in Me.Form.Filter

    I have a combo box on a form which I want to filter records as the user types. The combo box has two columns ID, Website and I want the WebSite filtered to a value in the DB.

    Using VBA I have written:

    Me.Form.Filter = "[WebSite] Like '*" & _
    Replace(Me.cboFilter.Text, "'", """) & "*'"

    but get a syntax error when I compile it. Not sure why.

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    You have one too many double quotes here - """)
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Syntax error query and form
    By jederac580 in forum Access
    Replies: 1
    Last Post: 08-02-2022, 10:07 AM
  2. Error with Syntax in Form
    By melb in forum Forms
    Replies: 2
    Last Post: 04-13-2015, 07:18 PM
  3. Filter property (missing operator syntax error)
    By Access_Novice in forum Programming
    Replies: 24
    Last Post: 01-28-2014, 09:17 PM
  4. Syntax Error in Query Expression on filter
    By alaric01 in forum Forms
    Replies: 1
    Last Post: 10-14-2010, 07:23 AM
  5. Incomplete Syntax Clause (syntax error)
    By ajetrumpet in forum Programming
    Replies: 4
    Last Post: 09-11-2010, 10:47 AM

Tags for this Thread

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