• Calling up Modal Form from Continuous Form (A2K)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Calling up Modal Form from Continuous Form (A2K)

    Author
    Topic
    #421845

    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

    Viewing 1 reply thread
    Author
    Replies
    • #959902

      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

      • #959941

        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,

    • #959905

      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?

      • #959943

        Hi Wendell,

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

    Viewing 1 reply thread
    Reply To: Calling up Modal Form from Continuous Form (A2K)

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

    Your information: