Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002

    Post Unanswered: Deleting a record

    I have a tabbed form with two tabs. On the second tab i have two subforms. On the main form, I have created a buton to delete the current record. When I click on the button, I receive the following message: run-time error 2455: You entered an expression that has an invalid reference to the property Form/Report. The poperty may not exist or may not apply to the object you specified.

    When I debug, I have an error on the following line: Forms![Frm_Role_Desc_Info]![Frm_Essential_Accountability Subform]![Frm_Performance_Criteria Subform].Enabled = True

    I receive this message before I get the message telling me I am about to delete 1 record.

    The above line of code is in the Form_Current event on the subform. It is there to check the status of a checkbox and enable/disable a field on the subform. It works great, until I go to delete a record from the main form. I've tried moving the code to Form_Load. When I do this, I don't get the error message on the delete, but my fields are not enabled/disabled as you scroll through the records on the subform.

    Please help!
    Last edited by cpetdw; 08-20-02 at 15:04.

  2. #2
    Join Date
    Feb 2002
    I think I would try moving this down a level.

    bility Subform]![Frm_Performance_Criteria Subform].Enabled = True

    Make it activate on the Current event for the frmEssentialAccountabilitySubform. I think this may prevent the error message.


  3. #3
    Join Date
    Aug 2002

    Tried changing form reference

    I tried the suggestion about changing the form reference and am now receiving the following message when I load the Frm_Role_Desc_Info: Run-time error 2450: HR Role Description Database can't find the form 'Frm_Essential_Accountability Subform' referred to in a macro expression or VB code. The form referenced may be closed or may not exist in this database. HR Role Description database may have encountered a compile error in the VB module for the form.

    This is the line that is highlited when I debug: Forms![Frm_Essential_Accountability Subform]![Frm_Performance_Criteria Subform].Enabled = True

    I took the Frm_Role_Desc_Info reference off the front of the line of code.

    The code is in the essentialaccountability subform current event.

    Thanks for any help.

  4. #4
    Join Date
    Nov 2002
    Northern VA

    Re: Tried changing form reference

    According to what I know try the following reference:

    Forms![Frm_Essential_Accountability Subform].form![Frm_Performance_Criteria Subform].Enabled = True

    I've been wrestling with this kind of stuff lately so it's fresh.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts