ApplyFilter

  • Thread starter Thread starter Gina Liddle
  • Start date Start date
G

Gina Liddle

In my form I want to pick a value from a ComboBox and use the value to
filter the "PL" field in that form. It all sound easy but obviously not for
me! I've
tried using the below code but to no avail, help would be appreciated.

PLName = cboPLFilter.Value
DoCmd.GoToControl "PL"
DoCmd.ApplyFilter , "PL = PLName"
 
If "PL" is the name of a Text Field in the Form's
RecordSource, you only need:

DoCmd.applyFilter , "[PL] = " & Chr$(34) & _
Me.cboPLFilter & Chr$(34)

HTH
Van T. Dinh
MVP (Access)
 
Back
Top