How do I filter a data*** using VBA?



Greetings.

I'm trying to write a VBA procedure to apply a filter to a form when it is
opened by a user. I only want to filter on one field. In this case, PROJ_ID =
6000. Sounds simple. The coding I tried to use, unsuccessfully, was:


Private Sub Form_Open(Cancel As Integer)

Me.OnFilter = "[PROJ_ID]='6000'"

End Sub


I've also tried...

Private Sub Form_Open(Cancel As Integer)

Me.Filter = "[PROJ_ID]='6000'"

End Sub


Instead, I still see all projects listed in the data***. What am I doing
wrong and what code should I use to filter out just the one project?

Sincerely,
Dirk

North/South Consultants Inc.
Winnipeg, Canada

.