Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Feb 2003
    Location
    Schererville, Indiana, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Forms--Tabs (1997)

    I am a new user of Access and I am creating a rather large database. It is going to act as a customer database for both sales and all staff.

    Here is my question/Problem.
    The form that I am creating is using 8 tabs. This is how the employees/management want it set up for easy use since most are not computer smart--they can use it for what they need, but have a hard time learning new programs/software.

    The first of the 8 tabs is the main tab--Company information. Now, on the other 7 tabs, mgmt. wants everything to relate back to the first tab. So for example, if someone calls up Company XYZ, everything on tabs 2-8 will change and have the information for Company XYZ located on them.

    Now, they wanted subforms used b/c there will be multiple records for some areas on the tabs. In the example of sales--there will be more than one sales call record per company and they want to be able to have all of the sales calls related to company XYZ to appear in single form view (the datasheet view is not liked by many of them because they can not see everything in a nice layout as in single form view)

    So is there anyway to have this actually happen? I am using a 1997 format at the moment.

    Any help would be greatly appreciated.

    Thank you!!
    Tracy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Forms--Tabs (1997)

    I assume that you have a table with company information, and perhaps a query based on that table. Make the table or query the Record Source of the main form (you can set the Record Source in the Data tab of the Properties window.) Place controls bound to the fields of the Record Source in the first tab of the main form.

    The table with company information should have a primary key that uniquely identifies the companies, for example an AutoNumber field. Let's say the primary key is named CompanyID.

    The related information, such as sales info, will be in separate tables that are linked to the company information table by the CompanyID field.

    Create forms based on these auxiliary tables. Since they will act as subforms, remember that they will have to fit inside the tabs of the main form when designing them. You may want to use a prefix in their names to make clear that they are subforms, for instance sbfSales or frmsubSales - there is no fixed rule for this, but it helps to use a consistent system.

    When you have designed the subforms, go back to the main form. We're going to insert the sales subform. Make sure that both the database window and the main form are visible. In the main form, activate the tab intended to display sales info. Drag the sales subform from the database window into the tab (it should be highlighted when you drag the subform over it) and drop it there. Access should fill in the master and child link fields of the subform automatically; if it doesn't, activate te Properties window, Data tab. If you click on the subform in the tab on the main form, you should see the master and child link fields. You can use the Builder button (the three dots) to set them, or enter CompanyID in both.

    Repeat this for the other subforms you have created.

    Close and save the main form. When you open it in form view, the subforms in the tabs should "follow" the main form automatically, that is, display only information related to the company displayed in the first tab.

  3. #3
    New Lounger
    Join Date
    Feb 2003
    Location
    Schererville, Indiana, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Forms--Tabs (1997)

    Thanks Hans!!

    So far so good--everything is working!!

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Forms--Tabs (1997)

    I heard that you have a problem when you add a new record to the main form and then add a new record to a subform (related record required).

    Usually, this means that there is something wrong with the link between the main form and subform. If the master and child link fields have been set up correctly, Access will automatically fill the child link field in the subform. So check the linking fields for each of the subforms very carefully.

    If this doesn't help, could you please provide some more detail about the structure of the tables that act as record source of the main form and of the problem suform, and about the master and child linking fields?

    You can also post a reduced version of your database:
    <UL><LI>Make a copy of your database. Use the copy in the following steps.
    <LI>Remove all tables, queries, forms, etc. that are not relevant to the problem.
    <LI>Remove all but a few of the records in the remaining tables - usually, just a small number of records is sufficient to illustrate the problem.
    <LI>Remove or modify sensitive or proprietary information.
    <LI>Compact the database (Tools/Database Utilities/Compact).
    <LI>Quit Access, and put the database in a WinZip file (extension .zip) - attaching a .mdb to a post is not allowed.
    <LI>The .zip file should be below 100 KB - usually, this is not a problem.
    <LI>Compose a reply in this thread and enter the path/file name of the .zip file in the "Attach a file - 100k Max." box. You can also click Browse... to locate it.
    <LI>Important: if you preview your reply, the attachment box will be cleared! You will have to re-enter the path/file name.[/list]This way, others will have a chance to examine the workings of the form and subform.

Posting Permissions

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