I have tried different options and have gone a field at a time. I want the form to be disabled as default then enabled once the Edit button is clicked. Everythig works as it should until I enter a 6th checkbox, then the entire form is locked and buttons don't work. I've deleted the code and the form is still locked. I have Enabled and Unlocked the fields within the Property settings but this just work as that and the code/buttons are useless. Here's what I'm doing:
Private Sub Form_Current()
'main fields
Me.txt_Title.Enabled = False
Me.cmb_Console.Enabled = False
Me.cmb_Condition.Enabled = False
Me.txt_Price.Enabled = False
Me.chk_InCollection.Enabled = False
Me.chk_Wishlist.Enabled = False
Me.chk_Favorite.Enabled = False
Me.chk_Rare.Enabled = False
Me.txt_Remarks.Enabled = False
Me.chk_Disc.Enabled = False
Me.chk_Cartridge.Enabled = False <---this is the one that starts it all...the 6th checkbox locks everything up
'Bottom buttons
Me.cmd_New.Enabled = True
Me.cmd_Save.Enabled = False
Me.cmd_Cancel.Enabled = False
Me.cmd_Edit.Enabled = True
Me.cmd_Delete.Enabled = True
Me.cmd_Exit.Enabled = True
End Sub
I have also used the following and get the same results:
Private Sub Form_Current()
Dim ctrl As Control
'Lock all textboxes
For Each ctrl In Me.Controls
If TypeOf ctrl Is TextBox Then
ctrl.Locked = True
End If
Next
'Lock all checkboxes
For Each ctrl In Me.Controls
If TypeOf ctrl Is CheckBox Then
ctrl.Locked = True
End If
Next
'Lock all drop-down menus
For Each ctrl In Me.Controls
If TypeOf ctrl Is ComboBox Then
ctrl.Locked = True
End If
Next
'Bottom buttons
Me.cmd_New.Enabled = True
Me.cmd_Save.Enabled = False
Me.cmd_Cancel.Enabled = False
Me.cmd_Edit.Enabled = True
End Sub
Either will lock the form useless even when no code is in it at all, and I have to start from scratch just to end up here.