Results 1 to 3 of 3
  1. #1
    kbp is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    11

    Values in a combobox

    I have created a form with a combo box on it. I want the combo box to hold a list of titles, but the data to update the id of the item selected?

    i have been playing around with it, and can't work out how to do it.

    i have 3 tables

    [job]
    id, details, employer, location

    [location]
    id, title, description

    [job_location] to join the two together


    id, job_id, location_id, description

    so job has the job details
    location has a list of locations
    and [job_location] has a the (id)'s from the other two tables and a description

    basically on the form i want a button that inputs the id of the location into the job table, but i want to see the titles (london, new york, paris) as opposed to 1,2,3,4 etc

    any ideas how this is done?

    cheers Andy

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    Hi,

    try playing with the combo box properties:
    * set the Rowsourcetype to Table/Query
    * set the rowsource to a query or SQL expression that gives the ID in column 1 and the description in column 2
    * set the bound column property to 1
    * with the format properties set the column count to 2
    * set with the column widths property the width of the first column to 0, the second column to the widht you want to show.

    The combo box will use the value of the first column to fill the field, and show the value in the first column with a width > 0

    success
    NG

  3. #3
    kbp is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    11
    cool, i was thinking along the same lines, but was wandering if it could be done another way.
    I'll have a go and see what happens

    thanks loads
    andy

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 12-03-2010, 04:05 PM
  2. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  3. Calculating values based on Combobox value
    By BrianFawcett in forum Programming
    Replies: 1
    Last Post: 05-06-2010, 01:26 AM
  4. Replies: 1
    Last Post: 03-24-2010, 08:42 AM
  5. Replies: 0
    Last Post: 12-16-2009, 01:14 PM

Tags for this Thread

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