Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calling up Modal Form from Continuous Form (A2K)

    Ya gotta love Access! The following code calls up my modal form from within a single form with no problem.

    Private Sub txtF06_Click()
    On Error GoTo Err_txtF06_Click
    DoCmd.OpenForm "frm Corporations - Contacts", windowmode:=acDialog, wherecondition:="AGMSysKey=" & cboVendor
    Exit_txtF06_Click:
    Exit Sub
    Err_txtF06_Click:
    MsgBox Err.Description
    Resume Exit_txtF06_Click
    End Sub

    However, when I try to run the same thing after I
    Cheers,
    Andy

  2. #2
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    Brookings, South Dakota, USA
    Posts
    449
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling up Modal Form from Continuous Form (A2K)

    Hi Andy,
    Where are txtF06 and cboVendor located on the form?
    What is the error message?
    Remember that for a continuous form, if the controls are in the details section (not header or footer) then there is only one instance of the controls, just reiterated for as many records as there are.

    gdr
    <IMG SRC=http://www.wopr.com/w3tuserpics/gdrezek_sig.jpg>
    "Those who dance are considered insane by those who can't hear the music" - George Carlin

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Calling up Modal Form from Continuous Form (A2K)

    I don't believe that windowmode:=acDialog is compatible with a continuous form - though I'm not positive, and a quick scan of Help doesn't give any hints. Try setting the Modal and PopUp properties and Continuous and see if Access complains. Also, what error message do you get when the code crashes?
    Wendell

  4. #4
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling up Modal Form from Continuous Form (A2K)

    Gary,

    As they say in the Real Estate world, "Location, Location, Location". Once I moved my control button up into the header instead of on the detail line, all worked well. Thanks kindly for your help,
    Cheers,
    Andy

  5. #5
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling up Modal Form from Continuous Form (A2K)

    Hi Wendell,

    As you can tell by my comments to Gary, all is well. Thanks kindly for jumping in,
    Cheers,
    Andy

Posting Permissions

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