Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Newtown, Pennsylvania, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DoCmd.OpenForm (popup form) (2000/SP3)

    I have a combo box on a form. When I double-click on the combo box, I want a second form to popup with a little more information than is visible in the combo box. I have tried

    Private Sub JournalConf_DblClick(Cancel As Integer)
    DoCmd.OpenForm "frmPopUpAbstractDueDate", acNormal, , MeetingID = Forms!frmPublications!JournalConf, acFormReadOnly, acDialog
    End Sub

    but this only takes me to the first record in the dataset.

    What might I be doing wrong?

    Thanks,

    Kiwi44

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: DoCmd.OpenForm (popup form) (2000/SP3)

    I hope that the omission of quotes around the Where-condition is a typo.

    Although I would never use the double click event of a combo box myself, the code in itself looks OK. I tested something similar just now, and it worked OK. Do you have code in the On Open or On Load event of frmPopUpAbstractDueDate that might set the form back to the first record?

    (I think double clicking a combo box is confusing. The user must click to open the list, click to select an item, then double click the selected item.)

  3. #3
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Newtown, Pennsylvania, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DoCmd.OpenForm (popup form) (2000/SP3)

    <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30> ! Thanks, Hans!

    I fully agree that that is too many clicks! However, in this particular case, the person inputting the data will normally be aware of the abstract due date, but to ease the verification process I want to be able to double-click on the record to remind the verifier if necessary. I was looking for a 'Mouseover'-type option, and this was the best alternative I could come up with. Maybe I could do something with MouseMove - I'll check that out over the weekend!

    If there is a better way, I'd be happy to hear suggestions!

    kiwi44

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: DoCmd.OpenForm (popup form) (2000/SP3)

    Why not provide a command button, or a custom toolbar button? Or use the On DblClick method of the detail section or something like that. All of these seem easier than double clicking a combo box.

  5. #5
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Newtown, Pennsylvania, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DoCmd.OpenForm (popup form) (2000/SP3)

    If I run the code from the Publications form, it works well. However, if I run Publications as a subform, I get a run-time error 2450 "... can't find the form 'Trials' <<the parent of 'Publications'>> referred to in a macro or VB code".

    What's wrong?

    Thanks,

    kiwi44

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: DoCmd.OpenForm (popup form) (2000/SP3)

    You're going to get into trouble if you want to use the same form both as stand-alone form and as subform. What is the exact code you're using now?

  7. #7
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Newtown, Pennsylvania, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DoCmd.OpenForm (popup form) (2000/SP3)

    Thanks for the offer of help - I got it working (Me.FieldName provided the criteria for the popup form.

    Kiwi44

Posting Permissions

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