Consulting

Results 1 to 4 of 4

Thread: [Access] How to create duplicate copies of the same form?

  1. #1

    [Access] How to create duplicate copies of the same form?

    hi,
    i have a form named "sales order form" in my access database.
    i would like to have a command button which upon click will create another form of the same template in "sales order form".

    i tried this:
    Private Sub Command2_Click()
        Dim frm As Form
       
        Set frm = CreateForm(, "sales order form")
    End Sub
    However, it ends up creating a new normal form instead of the "sales order form".

    Does anyone knows how to create duplicate copy of the same form?
    thanks.

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Try the DoCmd.CopyObject Method

  3. #3
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    Why do you need/want to create multiple forms?

  4. #4
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    I also wonder why you want your users to copy an existing form with the click of a button. This could be a much bigger headache than you realize. If you do not have any coding in place to delete these forms then your users will fill up your database with these useless, duplicate Forms.

    Also, what's the purpose of exactly duplicating an existing form? Are you wanting your users to be able to view 2 copies of the same recordset? If so, then you need to look into the clone method of ADO recordsets.
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


Posting Permissions

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