Checkbox Error 2448

Blkblts

Registered User.
Local time
Today, 14:54
Joined
Jan 21, 2000
Messages
61
Hay all,
I have a table which contains ProgID and MbrID. I have a form with no record source. On this form I have 3 checkboxes. What I am trying to do is display which program the member is in could be multiple.

I have code written as follows:

Private Sub Form_Open(Cancel As Integer)
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("Select * from tblProgramIn Order by MbrID;")
With rst
While Not .EOF
.MoveFirst
If rst("MbrID") = "12345" And rst("ProgID") = 1 Then
Me.ChkCHF = -1
End If
If rst("MbrID") = "12345" And rst("ProgID") = 2 Then
Me.ChkSenior = -1
End If
If rst("MbrID") = "12345" And rst("ProgID") = 3 Then
Me.ChkPain = -1
End If
.MoveNext
Wend
End With

End Sub
When I get a match the program errors with a runtime error of 2448 on the Me.Chk??? = -1 I have tried various things like
Me.ChkPain.value = -1
Me.[chkPain] = true
and my more variations, but nothing appears to get rid of the error message.

Thanks
kim
 
OK OK sorry guys I got it to work. Now other then the fact that I think I have myself in an infamous loop. Hay my life is great...

kim
 

Users who are viewing this thread

Back
Top Bottom