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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to test for SQL Server 'Role' in VBA

Status
Not open for further replies.

lorirobn

MIS
Mar 15, 2005
450
US
Hi,

I apologize for posting this question in multiple forums, but I wasn't sure which was the most appropriate.

I am running an Access Front End with SQL Server 2000 Back End. I have set up a few different Roles on the Server, including one of Manager. I have added a command button on one of my Access forms that will only be seen by one user (manager), but I don't know how to check for this.

Using VBA, how can I test for the SQL Server role the current user belongs to?

I have also posted on SQL Server programming, and Access Other Topics. If there is a better forum to post on, please let me know.

Thanks in advance for any help.
 
You'll need to use the SQL-DMO library.

Or you could try to do it in SQL. Look up the syspermissions table.
 
Here is a link to the post in the SQL Server Programming forum: thread183-1245548

As you can see from the thread, the solution is nearly complete, but there may still be some unanswered questions remaining.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top