Results 1 to 4 of 4
  1. #1
    DarthZ is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    17

    List box field value determining the value for another field

    Hi,

    I have a form where the first field determines the value of the second field. The first field is a multi select list box and so I was wondering if it is possible to have it so that if a certain item is selected in this list, it will fill in the second box with a number value of 1-5. Here is an example if that was not too clear:

    List box
    red
    purple
    green


    blue
    violet
    black
    white

    purple = 1 blue = 2 violet = 3 ...etc

    How exactly could I do this, and if the list box is not ideal then would a combo box be better served in this situation?
    And just a note: the list box currently contains about 12 catagories, but not all of them will equate to a value for the second value, meaning that the second field is only dependent on some of the values from the list field.

    I hope this made sense, and Any advice is appreciated,

    Thanks

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Research Cascading combo box for the concept involved
    http://www.baldyweb.com/CascadingCombo.htm

    Why did you choose Listbox?

  3. #3
    DarthZ is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    17
    Thanks for your response.

    I chose the listbox because we need often times need to make multiple selections for this field.

    I'm not too sure if a cascading combo box is what I was looking for because you still have to select an option for the second field. Using my initial example, I want it so that when somebody selects purple for one field, it automatically enters 1 for the second field. Is this something that can perhaps be done in a query instead? Kind of like calculating age from birthdates in a query?

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    I think there is some miscommunication.
    The typical cascading combo goes something like this

    You have need for a US State and the system has been set up with
    a combo for
    Regions:
    North
    East
    South
    West

    And Each Region has the States contained in that region.

    So when you select East in Combo 1, only Eastern states are available in Combo2.

    This doesn't seem to be what you need, but you did start by saying
    the first field determines the value of the second field
    which is the way a question about combos often appears.

    I think you should tell us more about your application. There may be some alternatives.

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

Similar Threads

  1. Combo Box - Field List Values
    By jennyaccord in forum Forms
    Replies: 5
    Last Post: 07-29-2011, 01:49 PM
  2. Replies: 1
    Last Post: 02-03-2011, 11:19 AM
  3. Update Field list in Table with Query
    By Scorpio11 in forum Queries
    Replies: 3
    Last Post: 07-16-2010, 01:57 PM
  4. No such field in the Field list
    By natalie in forum Forms
    Replies: 28
    Last Post: 07-15-2010, 10:12 AM
  5. Lookup or list field: how Do I not show all records
    By scott munkirs in forum Forms
    Replies: 4
    Last Post: 04-13-2006, 12:44 PM

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