I have just Upsized and now it has errors on all of my "Set rst" Can someone exsplain and help me fix this problem. It Looks like the querys work but not the connections to the database.
SAMPLE below: It just grabs the window user ID and then checks the user table. If the users is not there it add the user and then it is done.
Private Sub Command3_Click()
Dim rst As Object: Set rst = CurrentDb.OpenRecordset("User_Table"
Dim Varxx As Variant
Dim VarXXX As Variant
Dim VarX3 As Variant
Dim FindID As Variant
Dim OrderNumX As Variant
VarXXX = fOSUserName()
If IsNull(VarXXX) Then
MsgBox " You are not logged in correctly so please Reboot computer"
Else
Varxx = "'" & VarXXX & "'"
VarX3 = DLookup("[UserID]", "User_Table", "[UserID] =" & Varxx)
If IsNull(VarX3) Then
With rst
.AddNew
!UserID = VarXXX
.Update
End With
Set rst = Nothing
Else
End If
End If
Set ord = Nothing
Call UpdateUser
End Sub
SAMPLE below: It just grabs the window user ID and then checks the user table. If the users is not there it add the user and then it is done.
Private Sub Command3_Click()
Dim rst As Object: Set rst = CurrentDb.OpenRecordset("User_Table"
Dim Varxx As Variant
Dim VarXXX As Variant
Dim VarX3 As Variant
Dim FindID As Variant
Dim OrderNumX As Variant
VarXXX = fOSUserName()
If IsNull(VarXXX) Then
MsgBox " You are not logged in correctly so please Reboot computer"
Else
Varxx = "'" & VarXXX & "'"
VarX3 = DLookup("[UserID]", "User_Table", "[UserID] =" & Varxx)
If IsNull(VarX3) Then
With rst
.AddNew
!UserID = VarXXX
.Update
End With
Set rst = Nothing
Else
End If
End If
Set ord = Nothing
Call UpdateUser
End Sub