Results 1 to 10 of 10
  1. #1
    Join Date
    May 2012
    Posts
    13

    Option Group: how to write text into column instead of options value?

    Hi,

    I have an options group bound to a column. When I select the first option, the value "1" is written into the database column. I would prefer the option label to be written into the column so the database is human readable.

    How could I achieve this?...or is this not the recommended way of doing things?



    yours,

    Rob

  2. #2
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    We need a bit more context here.
    What exactly are you looking at? a table/query/form/report?
    When you say a group bound to a column, do you mean you have a dropdown list/combobox?

  3. #3
    Join Date
    May 2012
    Posts
    13
    sorry.
    ACCESS 2007 -XP

    I am creating a form which enters data into a table. I am programming the form in design view.

    There is an option group consisting of 3 radio buttons in the form giving the user 3 text values ...e.g river, lake, sea. Instead of having 1, 2 or 3 written into the bound column I would prefer to have the text e.g "river,lake or sea".

    Does this make is clearer?

  4. #4
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    Out of curiosity why have you gone with radio buttons and not a combobox/listbox?

  5. #5
    Join Date
    May 2012
    Posts
    13
    Radio buttons seemed more appropriate because only one of the three options may be selected.

  6. #6
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    The same can be achieved with a combobox.

    I assume there is a table to translate the 1,2,3 to a river, lake or sea?

  7. #7
    Join Date
    May 2012
    Posts
    13
    no I donīt have a table for the translations. Using the NorthWind db as an example, it doesnīt seem to have a translations table either in the form "Orders" (http://download.microsoft.com/downlo...N-US/Nwind.exe)

  8. #8
    Join Date
    May 2012
    Posts
    13
    I think this acheives what I want to do, but I donīt understand one thing. Do I have to have 2 fields in my table- one for the numerical value and one for the text?

    http://www.mrexcel.com/forum/showthread.php?t=526147

  9. #9
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    No you create a new table, lets call it Tbl_W_Srce

    In there you have Two fields

    Srce_ID (Autonumber), Srce_Type (Text)

    The data should then be something along the lines of

    1 River
    2 Lake
    3 Sea

    You can then use a little trick in the combo to use the table as the rowsource, and then hide the first column which stores the ID, and shows the second column.

    I have attached a sample db to aid you in this.

    However I must say, you may benefit from reading on normalisation if you arent using this method as it really is one of the greatest advantages of a relational database system like access!
    Attached Files Attached Files

  10. #10
    Join Date
    May 2012
    Posts
    13
    Thanks a million! That helps me a lot!

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

Similar Threads

  1. Option Group
    By x__hoE__x in forum Access
    Replies: 2
    Last Post: 12-10-2011, 09:39 AM
  2. Replies: 2
    Last Post: 12-05-2011, 04:53 AM
  3. Option Group on a Report
    By Paul H in forum Reports
    Replies: 1
    Last Post: 10-21-2011, 01:09 PM
  4. Option Group - Borders are gone
    By cevatyildiz in forum Forms
    Replies: 0
    Last Post: 04-30-2010, 06:08 AM
  5. Option Group
    By huskies in forum Forms
    Replies: 9
    Last Post: 12-02-2009, 12:06 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 - Senior Forums