Results 1 to 6 of 6
  1. #1
    Pure Salt is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Apr 2014
    Posts
    60

    Link pop up form to main form

    Hi. I have a form which is too large to use as a subform. I would like to add a button that will open a popup form & enter the main forms ID.



    Eg - I would like to create a new Customer (primary key is ID) within the main form, then open up the 'new quote' form which will automatically input the PK from the main table. Basically need to link the master fields but can't find a way with my popup.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    DoCmd.OpenForm "FormName"...
    Forms!FormName.CustomerID = Me.CustomerID
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Pure Salt is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Apr 2014
    Posts
    60
    What am I doing wrong please, tried the below but it came up with 'compile error: syntax error'

    Private Sub Command100_Click()
    DoCmd.OpenForm "New Quote"
    [Forms]![Copy of Add New Details].[ID] = Me.Customer ID
    End Sub

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You'd want to set the value of the form you just opened, wouldn't you?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Pure Salt is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Apr 2014
    Posts
    60
    I've only used subforms before, that is why I'm asking for help

  6. #6
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I mean:

    DoCmd.OpenForm "New Quote"
    [Forms]![New Quote].[ID] = Me.ID
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-13-2012, 02:11 PM
  2. Replies: 1
    Last Post: 09-04-2012, 10:42 AM
  3. Replies: 3
    Last Post: 01-05-2012, 07:15 PM
  4. Link main form with subform
    By lizzywu in forum Forms
    Replies: 1
    Last Post: 11-18-2011, 03:22 PM
  5. Replies: 3
    Last Post: 11-16-2011, 01:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums