View Full Version : filter by current user


gbanks
11-22-2000, 10:50 AM
I have a accees dbase that has a user access it using a password..

I wanted to have a button on the main form which would filter or show only records last modified by the current user..

On the Onclick event of the button I was writing

Docmd.applyfilter
where Me![ModifedBy]= CurrentUser()

This does not work.. Any thoughts? Thanks..

BarkerD
11-22-2000, 02:02 PM
Maybe try this.

Dim strFilterCriteria as string

strFilterCriteria="[modifiedby]= """ & currentuser() & """"
me.Filter=strfiltercriteria
me.filteron=True

Don't know for sure if it will work.
Forget the exact syntax

Duane Barker

gbanks
12-19-2000, 10:55 AM
thanks Duane.. This works great!!