Results 1 to 4 of 4
  1. #1
    Dega is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73

    Get values from another table (ID)

    I have three bare bones tables with tblCustomer, tblBookings, tblTours.
    Main form will be tblCustomers and sub forms tblBookings (datasheet).
    More subforms will be added later.

    In the bookings form I want to get the TourID FROM "TourName" in tblTours and enter it in the tblBookings table as a value and the combo box should not show the value but the TourName.

    Table relationships are attached to posting.

    Thanks


    tblTours
    TourID
    TourName



    (sample data)
    1 Destination-ONE
    2 Destination-TWO
    3 Destination-THREE


    tblCustomers
    CustID
    FirstName
    LastName
    DOB


    tblBookings
    BookingID
    CustID
    TourID
    Last edited by Dega; 05-16-2010 at 04:23 PM. Reason: ok

  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,529
    The combo box wizard should lead you through creating that. Presumably your form is bound to the bookings table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Dega is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Calgary, AB
    Posts
    73
    I was able to get it working without using the wizard and the values enter correctly in the tblBookings.

    But ... both the TourID and the TourName are showing in the combo box. I would like only the TourName to show in the combo box so is it the properties that I have to set?

    Eventually other users will be using the db and you know the rest.

    Thanks

  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,529
    Set the column width of that column to zero.
    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. Replies: 3
    Last Post: 04-04-2010, 05:26 PM
  2. Restrict Table values
    By Suzied in forum Access
    Replies: 1
    Last Post: 03-27-2010, 11:14 AM
  3. Replies: 2
    Last Post: 03-27-2010, 10:52 AM
  4. Duplicate Values in table
    By senthilrg in forum Queries
    Replies: 3
    Last Post: 12-18-2009, 09:24 PM
  5. Table values in forms
    By xzxz in forum Access
    Replies: 3
    Last Post: 10-28-2008, 08:29 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