Filter OnOpen

  • Thread starter Thread starter John
  • Start date Start date
J

John

I am trying filter records when the form is open. When I
read the heip files I am still confused. I have tried the
following:

Private Sub Form_Open(Cancel As Integer)

DoCmd.SelectObject acTable, "tblSalesOrders", True
DoCmd.ApplyFilter , "COM004StopDate = 'Null'"
(Runtime error 2488)

And

Me.Filter = "COM004StopDate = Null"
Me.Form.FilterOn = True

(Always filters all and goes to new record)

Thanks
John
 
Back
Top