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

IS_Member Function from Visual Basic

Status
Not open for further replies.

KLK000

MIS
May 22, 2002
37
US
How do I use the Is_member function from Visual Basic? I want to enable/disable form objects based on a user's permissions. The Is_member function appears to be what I want to use but I don't know how to include it in my VB code.
 
Example: Executre a query like the following to determine if the current user is a member of the "Accounting" role.

Select AcctMember=is_member('Accounting')

This will return 1 if the user is a member or 0 if not. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Thanks, but how do I execute the query in my VB code? Do I use DOCMD.RunSQL? If so, how do I check the value of AcctMember after I call DOCMD.RunSQL? Also, is AcctMember a variable in VB or is it a column in some Table?
 
I'm not a VB programmer but I think you could create a create a record set to return the results of the query. AcctMember is simply a name that I gave to the column to return the value in the result. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Hi,

u can execute the SQL, which Terry has shown from VB using ADO. just in same way as u execute a SQL to retrieve data from a table.

Sunil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top