Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jun 2001
    Location
    Bethlehem, Pennsylvania, USA
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opentable question (access 2k)

    I have 2 tables. 1 table is a template header table with basic information. The other table is a detail template. How could I retrieve (through code) some detailed information from the detailed template table based on the template header table ID? Also, Can anyone suggest a book that would help a newbie with using VBA in Access.

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opentable question (access 2k)

    It sounds as if the Header table and the Detail table are associated by a one to many relationship. Both of them should have the HeaderID as a field. In this case, open a query in the design view, add both tables and link from the Header table HeaderID to the Detail table Header ID. You can now retrieve any of the Detail fields by placing them in the query grid. To retrieve the Detail fields for a particular Header ID, place that HeaderID value in the grid as the HeaderID field criteria.

    If you look at the query design in the SQL view, you will see the code that this query creates.
    HTH

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Opentable question (access 2k)

    Unfortunately, I didn't understand your question, so I can't offer a solution. However, a good VBA book is "Beginning Access 97 VBA" by Sussman and Smith (I assume they have one for later versions of Access).
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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