View only own records in Access Web App (1 Viewer)

westcoastrhiann

New member
Local time
Yesterday, 19:44
Joined
Apr 21, 2014
Messages
2
I have an Access 2010 Web App that I have published to a SharePoint 2010 site. It is a time tracking database. What I am trying to do is setup security on a record level basis. Essentially what I need is when a user runs a report, that report only displays their own time tracking records. Does anyone know if this is possible?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 03:44
Joined
Feb 19, 2013
Messages
16,618
Yes, it is possible

Only allow users to view data through queries/forms and ensure each table has a field for the userid which can be used to filter the records
 

westcoastrhiann

New member
Local time
Yesterday, 19:44
Joined
Apr 21, 2014
Messages
2
Thanks for your reply, I'm hoping that you can supply a little more information.

- Which userid? From Access or from SharePoint?
- How does the web app know who created the record?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 03:44
Joined
Feb 19, 2013
Messages
16,618
It very much depends on your application and environment. If your users always use their own machine I would suggest the windows id (in vba this is environ("username") which returns a string value from the windows login) and the field would be populated at the time the record is created.

Alternatively, perhaps your users need to login to the app in which case you can use whatever login id is used there.

the web app 'knows' because it will filter the data in the query used for the form recordsource - e.g.

SELECT * FROM myTable WHERE username='" & environ("username") & "'"
 

Users who are viewing this thread

Top Bottom