filter by current user

gbanks

Registered User.
Local time
Today, 21:23
Joined
Feb 9, 2000
Messages
161
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..
 
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
 
thanks Duane.. This works great!!
 

Users who are viewing this thread

Back
Top Bottom