Hi everyone,
I have this code in a search as you type combo box, which I copied from here:
http://blogs.office.com/2012/05/03/u...h-as-you-type/
It works fine on the above site, but I get errors on my system Access 2013 Windows 8.
THe website punctuation is different in that the apostrophes face left and all the double quotes are the same..... I Cannot duplicate them
Private Sub cboFilter_Change()
' If the combo box is cleared, clear the form filter.
If Nz(Me.cboFilter.Text) = "" Then
Me.Form.Filter = ""
Me.FilterOn = False
'If a combo box item is selected, filter for an exact match.
'Use the ListIndex property to check if the value is an item in the list.
ElseIf Me.cboFilter.ListIndex <> -1 Then
' THE FOLLOWING LINE RETURNS A SYNTAX ERROR
Me.Form.Filter = "[Company] = '" & Replace(Me.cboFilter.Text, "'", """ & "'"
Me.FilterOn = True
' If a partial value is typed, filter for a partial company name match.
Else
' AS DOES THIS ONE
Me.Form.Filter = “[Company] Like '*" & Replace(Me.cboFilter.Text, "'", """) & "*'"
Me.FilterOn = True
End If
'Move the cursor to the end of the combo box.
Me.cboFilter.SetFocus
Me.cboFilter.SelStart = Len(Me.cboFilter.Text)
End Sub
any help appreciated...
Farnarkle