Q
Question - Mark
I am in over my head a bit!
I am working in NOVELL environment and have developed an Access
database where I want the Novell User ID that is logged into computer
to automatically populate a Label on a form. I have the following
code, which I have muddled through with great trouble and am not even
sure it will work yet: (I am pulling the name of the employee from a
table within the database which contains SSN, EmployeeName, and
LOGINNAME)
Private Sub Form_Load()
Dim dbs As ADODB
Dim rst As Recordset
employee_login_id = Environ("s_user")
Set dbs = CurrentDb
Set rst = dbs.openrecordset("select from login_user_ids where " &
Chr(39) & LOGINNAME & Chr(39))
If rst.EOF Then
End If
socialsecuritynumber = rst!SSN
sql_string = "select * from LOGIN_USER_IDS where " & Chr(39) & SSN
& Chr(39)
End Sub
Within the form that contains the label - I have the following so far,
I don't know how to get the name into the label. I don't even
completely understand what the line with sql_string does below other
than open my form.
Private Sub AddHours_Click()
On Error GoTo Err_AddHours_Click
Dim stDocName As String
stDocName = "FrmAddRecord"
DoCmd.OpenForm stDocName, , , sql_string, acAdd
Exit_AddHours_Click:
Exit Sub
Err_AddHours_Click:
MsgBox Err.Description
Resume Exit_AddHours_Click
End Sub
Any help is greatly appreciated!!!
Mark
I am working in NOVELL environment and have developed an Access
database where I want the Novell User ID that is logged into computer
to automatically populate a Label on a form. I have the following
code, which I have muddled through with great trouble and am not even
sure it will work yet: (I am pulling the name of the employee from a
table within the database which contains SSN, EmployeeName, and
LOGINNAME)
Private Sub Form_Load()
Dim dbs As ADODB
Dim rst As Recordset
employee_login_id = Environ("s_user")
Set dbs = CurrentDb
Set rst = dbs.openrecordset("select from login_user_ids where " &
Chr(39) & LOGINNAME & Chr(39))
If rst.EOF Then
End If
socialsecuritynumber = rst!SSN
sql_string = "select * from LOGIN_USER_IDS where " & Chr(39) & SSN
& Chr(39)
End Sub
Within the form that contains the label - I have the following so far,
I don't know how to get the name into the label. I don't even
completely understand what the line with sql_string does below other
than open my form.
Private Sub AddHours_Click()
On Error GoTo Err_AddHours_Click
Dim stDocName As String
stDocName = "FrmAddRecord"
DoCmd.OpenForm stDocName, , , sql_string, acAdd
Exit_AddHours_Click:
Exit Sub
Err_AddHours_Click:
MsgBox Err.Description
Resume Exit_AddHours_Click
End Sub
Any help is greatly appreciated!!!
Mark