Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    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

  2. #2
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post
    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?

  3. #3
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    Yes, I did add a break point and it was not reached. Just as you did, my dbl-click events were simple msgboxes.

  4. #4
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    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.

  5. #5
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post
    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.

  6. #6
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    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.

  7. #7
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post
    sweet.

Posting Permissions

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