Strange Error

KeaganQuilty

Registered User.
Local time
Today, 16:58
Joined
Jun 28, 2001
Messages
51
I've suddenly started getting a strange error. I'm hoping that somebody can tell me what it means.

The error is:
Run-Time Error '62531':

Circular reference caused by alias 'C1' in query definitions SELECT list.

Here's my code.

Private Sub C1_AfterUpdate()
If C1 = True Then
InstructorConflict ("C1")
End If
End Sub

Private Sub InstructorConflict(toggle As String)
If Not IsNull(DCount(toggle, "tblCourses", "[Instructor] = " & Instructor & " AND [" & toggle & "] = True")) Then
If DCount(toggle, "tblCourses", "[Instructor] = " & Instructor & " AND [" & toggle & "] = True") > 1 Then
MsgBox txtName & " is already scheduled to teach another course during " & toggle & ".", , "Conflicting Time"
End If
End If
End Sub

"C1" is one of twenty four toggle buttons that call the InstructorConflict Sub. The other twenty three don't have a problem, only C1. Any ideas? suggestions?

Keagan Quilty
Kilbride, Newfoundland
 
Did you say you have C1 to C24? And you have the same code format like below for all?

Try temporarily disabling C1 by putting 'in front of code.

Try if C2 would give you a problem.

it could be circular reference by using the same control name with the InstructorConflict ("C1) and the other codes are okay because C1 is the first code. If C2 is the first code, it could be the same problem with C2.

You could probably change one of your C1 to C1x, to differentiate them apart.

Private Sub C1x_AfterUpdate()
If C1x = True Then
InstructorConflict ("C1")
End If
End Sub



[This message has been edited by Liv Manto (edited 08-18-2001).]
 

Users who are viewing this thread

Back
Top Bottom