I am not sure why i am gettting a compile error, type Mismatch. Maybe my brain is fried and I cant see it.
:banghead:
Code:
Dim uName As String
Dim strfName As String
Dim strlName As String
Dim db As DAO.Database
Dim rs As DAO.Database
Dim iSQL As String
uName = CStr(fOSUserName)
If IsNull(uName) Then
MsgBox "It Appears your name is not registered with the Database, " & vbCrLf & vbCrLf & _
"Take a moment to register.", vbOKOnly, "Missing User Name"
DoCmd.OpenForm "frmOwner", acNormal
Else
iSQL = "SELECT tblOwner.oFirst, tblOwner.oLast " & _
"FROM tblOwner " & _
"WHERE tblOwner.WindowsLogin = '" & uName & "'"
Set db = CurrentDb
Set rs = db.OpenRecordset(iSQL, dbOpenDynaset)
With rs
[COLOR="Red"]strfName[/COLOR] = rs!oFirst
strlName = rs!oLast
.Close
End With
MsgBox "Welcome " & strfName & " " & strlName & "To the Joint Application Teams Management System.", vbOKOnly, "Welcome To The JAT Management System"
Set rs = Nothing
Set db = Nothing
End If
:banghead:
Last edited: