Referencing a Subform Error

M

MinnieTheMinxCat

I am very confused - am working with Access 2007.

Yesterday - I created form with 2 levels of nested subform - and referenced
the controls on both from the top level, and it worked fine. Code extract as
follows:

Private Sub SelectStaff_Change()
Me.Grade_Label.Visible = True
Me.Grade.Visible = True
Me.sfrmTimesheetdate.Form![Date].Enabled = False
Me.sfrmTimesheetdate.Form!sfrmTimesheet.Form![Task ID].Enabled = False
End Sub

The only thing I did after testing this - was to add an additional field to
the sfrmTimesheet form, but now this doesn't work. I'm sure adding the field
can't have had anything to do with the error - but can't imagine why Access
suddenly has changed its mind about this code.

The error is occuring on the final line of the above extract and says "Run
time error '2136500594 (800f00e)' Method 'Form' of object '_subform' failed.

HELP Please!!!!!
Thanks
Lindsay
(Minnie the Minx Cat - is asleep by the side of me and couldn't give a toss!)
 
P

Paolo

Hi Lindsay,

the "Method 'Form' of Object '_Subform' failed" error can be caused by a
corrupt subform.

To resolve:
You can try to compact and repair database

or

create a new form
copy all the controls of the subform in the newly created form (and the code)
name the old subform in another way and name the new form as the old subform

HTH Paolo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top