Results 1 to 6 of 6
  1. #1
    P5C768 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2009
    Location
    Denver, CO
    Posts
    95

    Setting Recordsource for Subforms


    I've tried to search for a solution to my question, but the other posts seem to refer to setting recordsource on subforms dynamically.

    I have a subform that has five tabs and I would like to have one recordsource for the parent form and five separate recordsources for each of the tabs on the subform. So in short, when I update a record on the parent form, I would like the data to be stored in six separate tables. Is this possible?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    That is not what SubForms are designed for. What data are you trying to get stored in all of the tables? Typically the data is only in one table and PrimaryKeys are stored on other tables as ForeignKeys.

  3. #3
    P5C768 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2009
    Location
    Denver, CO
    Posts
    95
    I'm trying to have a form that pulls in customer information like name address etc. and then uses a subform to pull in records linked on a primary key that has policy information for up to 5 unique policies (as in insurance policies, not foreign policies).

    I originally had all this information in one table, but it was becoming a leviathan and I decided to split each policy into it's own table, mainly because I couldn't get the reporting features I was looking for.

    If I changed the primary keys on the policy tables to foreign keys, would that achieve my result? Basically all I am looking for is an easy way to view around 15 data items related to a specific policy, for up to 5 policies.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If all of your policies were in one table, and each record had a ForeignKey field with the PrimaryKey of the Relevant Customer record, then you could easily display the Customer on a MainForm and the policies on a SubForm in ContinuousForm mode and clicking on a Policy record in the SubForm could pop up another form with more policy details if that is what you wanted. I can't believe that is just one sentence. I thought only lawyers wrote like that.

  5. #5
    P5C768 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2009
    Location
    Denver, CO
    Posts
    95
    Thanks for the info. I will research foreign keys and continuous forms as I'm not too familiar with those.

    RG, in your opinion, is this the best method for displaying data? I have seen databases that display tabs for customer info, spouse info and then a tab for each policy. That's the feel I was going for but ultimately I'm trying to find the most efficient design for the user.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The "Look and Feel" is in the eye of the beholder. It is *your* db and as someone here says, there are many ways to skin this cat.

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

Similar Threads

  1. Update Subform Recordsource
    By mystifier in forum Forms
    Replies: 8
    Last Post: 11-15-2010, 03:03 AM
  2. RecordSource help
    By mann2x in forum Access
    Replies: 3
    Last Post: 10-05-2010, 06:44 PM
  3. Replies: 2
    Last Post: 10-16-2009, 02:47 PM
  4. Recordsource with Multiple queries
    By darshita in forum Programming
    Replies: 1
    Last Post: 08-10-2009, 03:17 PM
  5. update recordsource of subform
    By AndyKim in forum Forms
    Replies: 1
    Last Post: 06-16-2009, 09:15 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