can any one help with this code, when i try and run it i get an error message
Compile Error - Method or data member not found
i have "borrowed" this code from Northwind sample database to autofill in check boxes
and i cannot get it to work - it keeps coming up with the error on line - rs.Edit
why is this??
thanks for any help
The Code Is:
CODE
Private Sub Form_Close()
' clear all checkboxes
Dim db As Database
Dim rs As Recordset
On Error GoTo HandleErr
Set db = CurrentDb
Set rs = db.OpenRecordset("select PrintFlag from tblContacts", _
dbOpenDynaset)
If rs.RecordCount > 0 Then
Do Until rs.EOF
rs.Edit
rs!PrintFlag = False
rs.Update
rs.MoveNext
Loop
Me!PrintLabelsSub!ckSelect = False
Me!PrintLabelsSub!lblSelect.Caption = "Select All tblContacts"
End If
' clear all checkboxes
Dim db As Database
Dim rs As Recordset
On Error GoTo HandleErr
Set db = CurrentDb
Set rs = db.OpenRecordset("select PrintFlag from tblContacts", _
dbOpenDynaset)
If rs.RecordCount > 0 Then
Do Until rs.EOF
rs.Edit
rs!PrintFlag = False
rs.Update
rs.MoveNext
Loop
Me!PrintLabelsSub!ckSelect = False
Me!PrintLabelsSub!lblSelect.Caption = "Select All tblContacts"
End If