Shady Level: VB Guru

 Registered: 08-07-2002 Posts: 305
|
Check Boxes Archived to Disk
Can anyone help me out with this:-
The main Form (DatabaseEntry.frm) has on it a check box (DDCheck) and in the DDCheck_Click I have the following code:-
Private Sub DDCheck_Click()
'Check for Direct Debit Check and display reminder
If DDCheck.Value = Checked Then
DetailsReview.Show
DatabaseEntry.Hide
Unload DatabaseEntry
End If
End Sub
And so to the problem in hand. If DatabaseEntry loads and the DDCheck is set to checked, DatabasEntry promptly unloads causing an "Object was unloaded" error. The problem is that the CheckBox is linked to a database, therfore if the first record of the database has DDCheck set as Checked, the code is executed immediately and the program crahes and burns. I need the code only to be executed if the CheckBox is physically changed, not when the form first loads.
Have a go at that if ya dare!!!
____________________________
I don't wanna die... but I ain't keen on livin' either
|