Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Vancouver, Canada
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Entering data using combo boxes (Access XP)

    I have set up a form to enter data. It contains combo boxes (drop down lists), labels that come up based on what the user selects in the combo box, as well as text boxes which the user types in. I would like the information the user selects and enters on the form to add a new record into a table. Right now all the information that the user types into the text boxes is added but the information that the user selects using combo boxes does not appear in the record. How can I make this information add into the record. (I've attached a couple of screenshots)

    Thanks in advance for your help

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

    Re: Entering data using combo boxes (Access XP)

    In the design view of the form, select a combobox. Open the property window and select the tab Data.
    The first line, the Control Source property, should contain the name of the field where the data from the combobox should be stored.
    You can click on the down arrow on the right to select a field.
    Francois

  3. #3
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Vancouver, Canada
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Entering data using combo boxes (Access XP)

    I think I needed to provide more information in my original post. Sorry. Selecting the control source doesn't work and I think it's because I already have a control source for the Product ID "label" which is vb "event" that fills in this field when the user makes a selection in the Products combo box. When I put in a control source on the Products combo box this event no longer works. I've attached a zip file of the actual database I'm working with if that helps.

    Thanks,

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

    Re: Entering data using combo boxes (Access XP)

    I have modify your db as follow :
    In table Inventory Transactions
    -Delete field description
    -Set length of field ProductID to 31 (same as in table inventory)
    -add field CategoryID
    In form Categories and Products
    -Combo Categories : set control source to categoryID, in after update add code to requery combobox Products
    -In On Current event of the form add code to requery combobox Products
    -In Combo Products Row Source change criteria for CategoryID to [forms]![categories and products]![categories] and Control Source to ProductID
    -In Combo EmployeeID set Control Source to EmployeeID
    Francois

  5. #5
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Vancouver, Canada
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Entering data using combo boxes (Access XP)

    Thanks. I need to report on the information that goes into the inventory transaction table and in the report I would like to show the Product Description and the Employee name rather than the Product ID and the Employee ID. Is there an easy way to do this?

    Thanks.

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

    Re: Entering data using combo boxes (Access XP)

    As you ask me that, I discover another error in the tables.
    In the table Inventory Transactions the field EmployeeID should be a Number Long Inter type. You'll have to remove the relation to change this. After the change, recreate the relation.
    For the report, create a query like in the attachment, add more fields if needed and use this query as record source for the report.
    Francois

Posting Permissions

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