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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top