Recordset Problem

  • Hi

    Something peculiar?

    I have the following code which worked fine for a couple of months, but now returns the error message:

    'You entered an expression which has an invalid reference to the property form/report'

    The code is:

        Forms![frmclass]![subfrmClassStudent].SourceObject = "subfrmClassStudent"

    Dim f As Form, rs As Recordset

    Set f = [Forms]![frmclass]![subfrmClassStudent].Form

    Set rs = f.RecordsetClone

    The error message appears on the first Set line.

    I don't understand why it has stopped working.  The same code works fine elsewhere in the db. 

    Can anybody suggest something I can try?

    Thanks

    Paul

  • Is  Forms![frmclass]![subfrmClassStudent] open to a specific record?

  • Hi Perry and thanks for the reply.

    Yes, it is linked to a ID number on the main form.

    Paul

  • That eliminates my only suggestion.  If nothing else works, I have a very low tech approach.  If you can create an mdb to mimic your ADP, the mdb has better tools for resolving that type of problem.  

  • Thanks, Perry

    I agree, the mdb does provide more useful ways of resolving problems.

    As I've run out of ideas, I'm importing from an earlier version where this facility worked.  There seems no logical explanation why it doesn't work now.  Maybe it's just one of those adp excentricities.

    Thanks again

    Paul

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply