Results 1 to 2 of 2
  1. #1
    jon84dwk is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2016

    Post Search Combo Box Error

    I am new to MS Access and i am trying to implement search using combo box. I am getting an compile (Syntax error) and i would appreciate if someone could help me out. Below is what i did:

    Private Sub Combo275_AfterUpdate()
    Dim Product As String
    Product = "Select * from G/S Stuff Sent where {[Product Name] =  " & Me.Combo275 & ") "
    Me.G/S Stuff Sent_subform1.Form.RecordSource = Product
    me.G/S Stuff Sent_subform1.Form_Requery
    End Sub

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Nevada, USA
    3 problems right off. The inadvisable spaces and symbol in the table name will require it to be bracketed. You've got a squiggly bracket in there rather than a parentheses. If the field in the criteria is text, the value needs to be surrounded by single quotes.
    Paul (wino moderator)
    MS Access MVP 2007-2019

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

Similar Threads

  1. Replies: 6
    Last Post: 09-22-2015, 03:30 PM
  2. Replies: 3
    Last Post: 01-04-2015, 06:09 PM
  3. Replies: 7
    Last Post: 08-08-2012, 03:28 PM
  4. Replies: 1
    Last Post: 04-20-2012, 03:16 AM
  5. Replies: 4
    Last Post: 08-16-2011, 05:54 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 - Senior Forums