Hi Everyone,
This has been bugging me for far too long now that I'm going blind and stupid!
Im Trying to do automated access permissions to a database based on the users Active Directory Alias, but want to set 3 user levels being Admin, User and Read Only.
I have done a Dlookup for one criteria, but seem to go stupid trying to do two criterias from the same Table
The single criteria code I have done which works is;
I have done the following but doesnt work;
If anyone is able to help, it'd be much appreciated. I believe i'm going blind as I have been looking at it for too long. Going to go for a coffee and come back to it I think haha!
All the best
Stuart
This has been bugging me for far too long now that I'm going blind and stupid!
Im Trying to do automated access permissions to a database based on the users Active Directory Alias, but want to set 3 user levels being Admin, User and Read Only.
I have done a Dlookup for one criteria, but seem to go stupid trying to do two criterias from the same Table
The single criteria code I have done which works is;
Code:
If DLookup("[Alias]", "Tbl_Users", "[ID]=" & Environ("Username")) Then Flag = 1
I have done the following but doesnt work;
Code:
If DLookup("[Alias]", "Tbl_Users", " "[ID]=" & Environ("Username") And [Permissions] = 'User'") Then Flag = 1
If anyone is able to help, it'd be much appreciated. I believe i'm going blind as I have been looking at it for too long. Going to go for a coffee and come back to it I think haha!
All the best
Stuart