Here are 2 ways of doing it. You can put this code on the Form Load event of the form that's being opened, and it will take you to the first record that is not complete:
1) Use a recordset and the criteria with the "FindFirst" method -------------
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = Me.Recordset
rs.MoveFirst
rs.FindFirst "cboComplete = False"
Set rs = Nothing
Set db = Nothing
2) Use these two lines - go to the control for the cboComplete field; then use "False" as the value to find for that field -------------
Check 2 things -
1) Make sure the Allow Edits property on the form is set to true
2) Make sure the Enabled property is true and the Locked property is false on the cboComplete control
Upon form open, I am brought direct to the first available false cboComplete. I can check any box I want. But I still can't UNCHECK any of the cboComplete boxes that I check.
Is cboComplete a check box or a combo box? I'm asking because usually a control name starting with 'cbo' is a combo box, but using a check box makes more sense.
If it is a check box you can add a combo box bound to the same field (just for testing). When you click the check box, the value in the combo box should toggle between 0 (false) and -1 (true).
I'm not sure what's going on. Make sure that the recordset type for the form is not set to 'Snapshot', and that there are no edit locks on the form or controls.
The field is really chkComplete. Sorry! It is a check box.
I changed the Record Type from Dynaset to Snapshot, what is the difference?
When I now try to click on any of the checkbox's, a message displays in the lower left hand side of the application: Searching....Press Ctrl+Break to stop
If the recordset type for the form is Snapshot, then the records can not edited. It will just display a static view of the table's data. When I did a test with a Snapshot recordset type, the status bar in the lower left says "This Recordset is not updateable"
Dynaset means that the records can be edited (provided the form allows edits and the control is not locked.)
If you want to send me a small db with just the table and form, I will try to figure out what's going on.
don@rdm-cc.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.