Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2003
    Posts
    42

    Unanswered: Combo Box Help in Access...

    Hi,

    I was wondering if anyone could help me? Basically, I've set up a small database for a car hire company, and I have nearly finished it. However, something that I need to do, and am really not sure how to, is, when you select a car from a drop-down box, e.g. Ford Fiesta, the category that the car belongs to is automatically put into the CarCategory text box.

    There are five categories - A, B, C, D and E and, for example, you choose the car 'Ford Fiesta' from the drop-down menu, the category 'A' is automatically put into the CarCategory text box (as the Ford Fiesta belongs to category A).

    Does anyone know how to achieve this? I would be extremely grateful for any help!

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Depending on how you set this up you can trap the ComboBox After_Update event and pull/set the corresponding textbox accordingly ...

  3. #3
    Join Date
    Dec 2003
    Posts
    42
    Sounds good, only problem is, I have no idea how to do this!

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Where do you store these categories?

    HOW TO TRAP AN EVENT:

    View the form's code.
    Selection the control you want to trap event for (lefthand combobox) and then select the event to trap from the righthand combobox.

    In the event method, set the textbox's text using:

    MyTextBoxName.Value="Whatever you want here ..."

  5. #5
    Join Date
    Dec 2003
    Posts
    42
    At the moment, all I have done is to make two fields in my table, the first called CarMake and the second called CarCategory, as I wasn't sure at all how to go about this and I have very little to no VB experience!

Posting Permissions

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