B
Betsy
I keep getting the error message "Object Required"
or 'Object Variable not set" if I take out the open
statement.
Sub UpdateStatus()
Dim tblWIAStudentInfo As ADODB.RecordSet
tblWIAstudnetinfo.Open
Do Until tblWIAStudentInfo.EOF = True
If tblWIAStatus_ID.OldValue = 1 Then
tblWIAStatus_ID.Value = 9
ElseIf tblWIAStatus_ID.OldValue = 4 Then
tblWIAStatus_ID.Value = 10
ElseIf tblWIAStatus_ID.OldValue = 5 Then
tblWIAStatus_ID.Value = 11
ElseIf tblWIAStatus_ID.OldValue = 6 Then
tblWIAStatus_ID.Value = 12
ElseIf tblWIAStatus_ID.OldValue = 7 Then
tblWIAStatus_ID.Value = 2
End If
tblWIAStudentInfo.MoveNext
Loop
tblWIAStudentInfo.Close
End Sub
or 'Object Variable not set" if I take out the open
statement.
Sub UpdateStatus()
Dim tblWIAStudentInfo As ADODB.RecordSet
tblWIAstudnetinfo.Open
Do Until tblWIAStudentInfo.EOF = True
If tblWIAStatus_ID.OldValue = 1 Then
tblWIAStatus_ID.Value = 9
ElseIf tblWIAStatus_ID.OldValue = 4 Then
tblWIAStatus_ID.Value = 10
ElseIf tblWIAStatus_ID.OldValue = 5 Then
tblWIAStatus_ID.Value = 11
ElseIf tblWIAStatus_ID.OldValue = 6 Then
tblWIAStatus_ID.Value = 12
ElseIf tblWIAStatus_ID.OldValue = 7 Then
tblWIAStatus_ID.Value = 2
End If
tblWIAStudentInfo.MoveNext
Loop
tblWIAStudentInfo.Close
End Sub