Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    1

    Unhappy Unanswered: Help! How do I get forms to auto-fill keydata fields

    Help! I'm using Access 2002 XP. I'm creating a simple bookings database which has a typical Customer table (first name lastname address etc.) with a primary key named CustomerID of autonumber type, and another table called Bookings which also has the CustomerID key and CusttomerLastName field and a primary key named BookingsID (autonumber).

    The idea is that users will go to a Customer form to enter the customer details, then click on a button which opens the booking form. The booking form will then already show the correct CutomerID and CustomerLastName and it is only then necessary to fill in the remaining booking data on the form to finish creating the record.
    I have defined relationships of one customer to many bookings linking the CustomerID field. I have defined the CustomerID field in the Bookings table as: lookup- Display Control=combo, Row Source Type=Table/Query, and Row Source=SELECT Customers.CustomerID FROM Customers.

    I create the corresponding forms, adding a button for open-form (bookings) on the Customer Form, but when I create a new record using the Customer form, then click the button to open the Bookings form, both the CustomerID box and the CustomerLastName boxis are drop-down menu type (combo-boxes?) with a default value of '1' in the CustomerID box. Also there is no correlation between the Customer ID and CustomerLastName in the bookings form.

    I'm sure this is a simple problem but I'm new to Access and have spent hours trying to fathom it. Any help would be very welcome.

  2. #2
    Join Date
    Aug 2004
    Posts
    40
    "but when I create a new record using the Customer form, then click the button to open the Bookings form, both the CustomerID box and the CustomerLastName boxis are drop-down menu type (combo-boxes?) with a default value of '1' in the CustomerID box. Also there is no correlation between the Customer ID and CustomerLastName in the bookings form."

    Not sure what you getting at here. When you create a new record, what exactly happens?

    Howard

Posting Permissions

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