multiple startup forms

  • Thread starter Thread starter amerchant
  • Start date Start date
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
 
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
 
Back
Top