Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter On Open of a form

Status
Not open for further replies.

sdimaggio

Technical User
Jan 23, 2002
138
US
I want to filter a query which is the record source of a form when it opens. I want to filter the data based on sales rep so the salesman can only see their data when the form comes up. here is my code. it does not work.

Private Sub Form_Open(Cancel As Integer)

Me.AllowFilters = True
Me.Filter = (([qry_Approval Profile].[Sales Rep]="Bob"))

End Sub

Any help would be welcomed.

Thanks,

Steve

 
Sub Form_Open(Cancel As Integer)

Me.AllowFilters = True
Me.Filter = (([qry_Approval Profile].[Sales Rep]="Bob"))
docmd.applyfilter
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top