N
Natasha
Hi
I am trying to get a checkbox field in one table to equal
true based on a certain value in another table, where
applicable. The error comes up in the line reading:
....
Loop Until EOF
....
I do not know what the argument is that I'm supposed to
be using. My code is as follows:
*********************************
Option Compare Database
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim RecSet
Dim Temp1 As Boolean
Set RecSet = CurrentDb.OpenRecordset
("tblProspectInCategory")
With RecSet
.MoveFirst
Do
If CategoryName.Value = "Old Girl" Then
Temp1 = True
Else
End If
UpdateOG Temp1
.MoveNext
Loop Until EOF (error happening here)
.Close
End With
MsgBox "Finished", vbOKOnly, "Done"
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description & Temp1
Resume Exit_Command0_Click
End Sub
________________________________________________________
Function UpdateOG(OldGirl As Boolean)
Dim RecSet
Set RecSet = CurrentDb.OpenRecordset("tblProspect")
With RecSet
.MoveFirst
Do
.Edit
.OldGirl = True
.Update
Exit Do
.MoveNext
Loop Until EOF
.Close
End With
End Function
Any help would be appreciated. Thanks.
I am trying to get a checkbox field in one table to equal
true based on a certain value in another table, where
applicable. The error comes up in the line reading:
....
Loop Until EOF
....
I do not know what the argument is that I'm supposed to
be using. My code is as follows:
*********************************
Option Compare Database
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim RecSet
Dim Temp1 As Boolean
Set RecSet = CurrentDb.OpenRecordset
("tblProspectInCategory")
With RecSet
.MoveFirst
Do
If CategoryName.Value = "Old Girl" Then
Temp1 = True
Else
End If
UpdateOG Temp1
.MoveNext
Loop Until EOF (error happening here)
.Close
End With
MsgBox "Finished", vbOKOnly, "Done"
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description & Temp1
Resume Exit_Command0_Click
End Sub
________________________________________________________
Function UpdateOG(OldGirl As Boolean)
Dim RecSet
Set RecSet = CurrentDb.OpenRecordset("tblProspect")
With RecSet
.MoveFirst
Do
.Edit
.OldGirl = True
.Update
Exit Do
.MoveNext
Loop Until EOF
.Close
End With
End Function
Any help would be appreciated. Thanks.