Proper Filter Syntax

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The following code is working properly for text fields.

Private Sub cboPTCBL_AfterUpdate()
Me.Filter = " [PTC_BL]= '" & Me.cboPTCBL & "'"
Me.FilterOn = True
Me.cmdTurnFilterOff.Visible = True
End Sub

How does the syntax change if I want to run this filer on number field?

TIA
 
cvegas said:
The following code is working properly for text fields.

Private Sub cboPTCBL_AfterUpdate()
Me.Filter = " [PTC_BL]= ' " & Me.cboPTCBL & " ' "
Me.FilterOn = True
Me.cmdTurnFilterOff.Visible = True
End Sub

How does the syntax change if I want to run this filer on number field?

Lose the single quotes.
 
Back
Top