Results 1 to 12 of 12
  1. #1
    gafort is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Cleveland, Ohio
    Posts
    22

    Forms not properly linked to table

    I have a simple contact database with one table. Form one shows contact information, website, facebook, etc. I made a second form for additional information so the first form wasn't too crowded. All fields from both forms are in the one table. To go from form 1 to form 2 I have a button with the following code:

    Private Sub Questions_Click()


    DoCmd.OpenForm "Questions", acNormal
    DoCmd.Close acForm, Me.Name
    End Sub

    When I enter values into form two they remain for all records in form one. The values should be specific for each recordset in form one. Am I missing something to link the two forms together?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Well, this would open the second form to the same record:

    http://www.baldyweb.com/wherecondition.htm

    but personally I'd use a tab control and have everything on one form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    gafort is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Cleveland, Ohio
    Posts
    22
    I like the look and feel of a tab control better anyway. Thanks for that. I dropped form one and form two on the navigation form and still have the same problem. When I'm on record one and switch to tab two and enter any information, that information is now on ALL records, not just record one. Form one has contact information of auto dealers and form two has specific information about their dealership. It is all on one table. Something is not connecting.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    If you're seeing the same info for all records, it sounds like the text boxes are not bound to fields in the table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    gafort is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Cleveland, Ohio
    Posts
    22
    OK I see something I didn't before. The information entered into form two is correct, it is the form two record not staying on the same as in form one. If I am on form one record 10 and click form two, how do I keep it on record 10. When I click form two, I am back to record one. I think that is my problem

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    That is one reason I'd use a single form with a tab control. If you want to use two forms, you'll need code to keep them in sync. It would use a variation of this:

    http://www.baldyweb.com/Bookmark.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    gafort is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Cleveland, Ohio
    Posts
    22
    OK, now I'm a little confused. Are you saying use the same form twice and just remove controls you don't want to see?

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    I've said "one form" and "a single form". I'm not sure how to say it any clearer. One form with a tab control, not two forms.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    gafort is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Cleveland, Ohio
    Posts
    22
    Paul, that's what I'm using, one form. I took one form, Car Dealers and dragged it to tab #1. How do I get additional information on tab #2? Tab #2 shows "Add New". If I click on it, it shows an unbound form. That's where it is not making sense to me.

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Dragging one form to another created a subform. I think you'd be better served by starting fresh with a blank new form. Add a tab control to it, bind it to the table, then add controls (text boxes, combo boxes, etc) to each tab as appropriate.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    gafort is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Cleveland, Ohio
    Posts
    22
    Sorry for the trouble, I was trying to use a tabbed navigation control by mistake. I think I have it figured out now. Thanks

  12. #12
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    No problem, post back if you get stuck.
    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. Linked forms
    By cptNemo in forum Forms
    Replies: 5
    Last Post: 09-13-2012, 11:20 AM
  2. Linked forms
    By Misha in forum Forms
    Replies: 4
    Last Post: 02-26-2012, 08:52 AM
  3. Replies: 0
    Last Post: 10-11-2010, 02:40 AM
  4. Multiple linked forms
    By johnpaul in forum Forms
    Replies: 2
    Last Post: 09-20-2010, 02:10 AM
  5. Calculations in linked forms
    By Dena Grabinar in forum Forms
    Replies: 0
    Last Post: 08-22-2008, 05:34 AM

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