Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Posts
    107

    Unanswered: creating a combo box 2 values

    How do i create a drop down list that displays a list of text options... but then translates into integer values when saved to the database? do i have to write code to do this or can i do this somehow in the properties of the combo box ?
    i'm a newbie to access forms. please and thanks.

  2. #2
    Join Date
    Feb 2003
    Posts
    107

    I think I figured it out

    i created a combo box with 2 columns using the wizard - col1 is the text that will be displayed and col2 is the int value to be written to the table. and then when prompted, i specified the second column as the identifying field for the control. is this correct / the best way to do this?

  3. #3
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    yes
    I rule is
    data I want it the first col a and everthing else is display

    Look at the Properties of the combo box

    play witht coloum count
    the count must include the hidden cols
    and the coloum width

    0cm;0.5cm,0cm,6.0cm

    the above will make the 1st and 3rd hidden

    aaa = me.combobox.coloum(3) will read the 3rd coloum of the selected row
    even tho its hidden

    put the code after the event afterupdate
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

Posting Permissions

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