Hi All,
I have the following module that basically looks at the table and if the user does not exist (the workstation LANID) then it asks the user to create a new logon for that user. But how can i also ask the user to enter other details such as forename, surname, DOB and sav it to the table also?
Function LanCheck()
Dim Lan, Emp As String
Lan = GetWorkstationLan
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("Select * from tblStaff where Employee_Lan = '" & Lan & "';")
If rs.RecordCount = 0 Then
Emp = InputBox("Please Enter Your Name as You have not got an account.",)
If Emp = "" Then
MsgBox "You did not enter a name!!!"
DoCmd.Quit
End If
With rs
.AddNew
!employee_name = Emp
!employee_lan = Lan
.Update
End With
End If
End Function
Thanks
________
Sweetcutepussy25
I have the following module that basically looks at the table and if the user does not exist (the workstation LANID) then it asks the user to create a new logon for that user. But how can i also ask the user to enter other details such as forename, surname, DOB and sav it to the table also?
Function LanCheck()
Dim Lan, Emp As String
Lan = GetWorkstationLan
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("Select * from tblStaff where Employee_Lan = '" & Lan & "';")
If rs.RecordCount = 0 Then
Emp = InputBox("Please Enter Your Name as You have not got an account.",)
If Emp = "" Then
MsgBox "You did not enter a name!!!"
DoCmd.Quit
End If
With rs
.AddNew
!employee_name = Emp
!employee_lan = Lan
.Update
End With
End If
End Function
Thanks
________
Sweetcutepussy25
Last edited: