Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    May 2002
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opening forms to specific records messes me up (xp/2k)

    I'm not sure I know how to explain what I want but here goes. I have an inventory DB with computers inventoried in one table, and their peripheral components in another. In the computers inventory form, you can select any of the components (video card, etc.) from a combo box and the components form pops up showing the record for that part. When I'm on the components form then, I am only able to see that one component, and can't browse other records. But I frequently wish to browse at least the components in that particular machine from the components form. Access seems to limit me to either opening a form to view one record, to add records, or to view everything in the table. I only want to see the records belonging to a particular computer. I have almost no experience yet with using DAO or ADO, but I imagine that there must be a way to open the components form so that it has a recordset containing only parts in this particular machine. More generally, or if that's not possible, is there a way to change the add/edit mode of a form while it's open? I mean, can I open it to view a particular record and still be able somehow to browse all or part of the table?

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening forms to specific records messes me up (xp/2k)

    You have to add a third table to your design. It will contain 2 fields. The CopmuterID field and the ComponentID field.
    Make a query with the Third table and the component table.
    Use this query as Control Source for a subform on a form that is based on the computer table and link the two with the ComputerID field.

    Hope this help you on your way.
    Francois

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

    Re: Opening forms to specific records messes me up (xp/2k)

    I'm pretty sure that what you want is possible, but it would be useful if you could explain how you open the components form now.
    <UL><LI>Is the record source of the components form a query with references to controls on the inventory form (like Forms!frmInventory!cboComponents)?
    <LI>Or do you open the components form with a WhereCondition:
    DoCmd.OpenForm "frmComponents", , , , , , "ComputerID=... And ComponentID=..."
    <LI>Or another method?[/list]Please explain.

    Regards,
    Hans

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Opening forms to specific records messes me up (xp/2k)

    It sounds to me like you could show components in a subform within the computer form.
    This way, typically, the top half of the screen would display info about the computer, and the bottom show a list of components. If there is not enough room to show all the info about any one component, you could have a Show Details button that showed more about a selected component.
    Regards
    John



Posting Permissions

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