multiple startup forms

A

amerchant

Need Help:

I am not much of a programer, but I manage to do pretty well with access. I
have an ADP application connected to MSDE. I want to be able to display
different forms on startup based on the user logging in. Currently users are
logging in using sql username/password. I know that I prob. need a table with
username and formname, but how do i access which user is logged in? Any help
would be appreciated.... Do I need to use the autoexec macro?

Thanks,
Ayaz
 
S

Sylvain Lafontaine

You need to call the function SUser_Sname() on the SQL-server. IS_MEMBER()
can also be useful. For example:
Dim s As String
s = "Select SUser_SName() as su"


Dim rs As ADODB.Recordset
Set rs = Application.CurrentProject.Connection.Execute(s)


MsgBox rs("su")


You may also take a look at these previous threads:

« Stored procedure problem », 3/15/2006, AkAlan

« Getting User Login/Role », 3/14/1006, steel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top