• Subform Datasheet Events

    Author
    Topic
    #471603

    I have a main form which allows the user to “filter” the data in a subform in datasheet view (it actually creates a custom sql and updates the subform’s Recordsource property). I have set up two events in the datasheet sub form: a Form Dbl-Click and a Dbl-Click on one of the columns/controls. In testing, I’ve opened the subform directly and each event fires correctly. However, when I test the two events by opening the main form, neither event fires. I’ve double checked the subform properties and all seems OK, but I’m clearly missing something.

    Appreciate any thoughts and insights,
    Marty

    Viewing 5 reply threads
    Author
    Replies
    • #1243901

      Marty,

      I’ve tested double click in a DS subform with a simple msgbox and it seems to work OK even if there is code in the parent form’s double click.

      When you say the events don’t fire, have you put a break point in to test that the event is firing as opposed to the code not doing anything?

    • #1243908

      Yes, I did add a break point and it was not reached. Just as you did, my dbl-click events were simple msgboxes.

    • #1244222

      No resolution, but some additioinal insight. I tweaked things a bit so that when my main form is opened the subform is visible. At this point the dbl_click events work as expected. In the After_Update event of a drop list in the Main form, I create an SQL statement for the recordsource of the subform and make the assignment (Me!subformcontrol.Form.RecordSource = stSQL). The correct records are displayed, but now the subform dbl_click events will not fire. The reassignment of the subform recordsource property is the only modification that is made in the After_Update event.

    • #1244484

      any chance you can post a stripped down database with the forms and just enough data to test with and I’ll check it out.

    • #1244864

      Well, problem resolved. I rebuilt both the main and subforms from scratch and all is well. Must have been a bug/error in one or both of the original forms.

    • #1244865

      sweet.

    Viewing 5 reply threads
    Reply To: Subform Datasheet Events

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: