I get a similar message 'You can't carry out this action at the present time' (I suspect it is actually the same).
I've had this problem ever since we were forced to move to Access2000 (the problem never ever appeared in Access97).
Basically I have a 'datasheet/spreadsheet' style subform which users can browse through and having selected a particular item they can then go to an 'edit' form. This is fine until they sort the data in the datatsheet(any column, any order); trying to enter the 'edit' form causes the above error.
If one tries to edit the form/code when in this state, you get the message 'You can't switch to a different view at this time.Code was executing when you tried to switch views. If you are debugging code, you must end the debugging operation before switching views.' - something that I'm definately not doing. Closing the database is not enough as the ldb remains open and locked - Task Manager (Win2000) shows a MSACCESS process (not an application though) still running - killing this allows the ldb to be deleted and one can then get back into the db.
The code that runs when a user wishes to enter the 'edit' form is below:
Private Sub EditSingleRecord_Click()
On Error GoTo Err_EditSingleRecord_click
Forms("systemform"
.Controls("text0"
.Value = Forms("big form1"
.Controls("big form index"
Forms("systemform"
.Controls("text2"
.Value = "Big form1"
DoCmd.OpenForm ("edit-form"
Exit_EditSingleRecord_click:
Exit Sub
Err_EditSingleRecord_click:
MsgBox Err.Description
Resume Exit_EditSingleRecord_click
End Sub
where 'BigForm' is the form that contains the subform, 'big form index' contains the index from the subform (temporarily held in 'text0' in 'systemform' for the underlying query that 'edit-form' references); please excuse the crap naming of objects/controls.
I'm currently reading up about DAO ver ADO as I inititally suspected a clash; I can tell that the db is referencing the MS DAO 3.6 object lib, together with the VB for Apps, MS Access 9.0 object lib,MS Calendar control 9.0, OLE Automation, and MS VB for Apps Extensibility 5.3 but I (in ignorance?) don't suspect anything here.
Myself and another 'techuser' have been experimenting and we can write 'clean' Access2000 db's from scratch that display the same problem, so my suspicion that something was lurking somewhere from '97' has been quashed. This particular bug does not appear when using a straight forward datasheet, only when the data sheet is a subform.
Hope this is enough info.
Any thoughts ?