Results 1 to 5 of 5
  1. #1
    Waubain is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    25

    Displaying a option group value in a report as name


    I have a option group that represents the stages of a project. The option group is in Form1 and the value of the option group is in Table1

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Do you have the option group values stored anywhere? If not you can use a switch function but it isn't as optimal as pulling it from a table.

    So you could use

    =Switch([FieldNameHere] = 1, "Option 1 Name", [FieldnameHere] = 2, Option 2 Name", [FieldNameHere] = 3, "Option 3 Name")

  3. #3
    Waubain is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    25
    I started this thread and got called away and looks like it posted the start.

    The option group values are stored in table 1. The labels on the form are as listed

    Label Status (Option group value)

    Ongoing 1
    Development 2
    Idea 3
    Completed 4

    When I run my report I want the projects group by Status, but I want a description (same as Label) rather than the number. I could change the option value to the name but I want them group in the order of 1,2,3,4.

    I tried to create a second table with StatusDescription and link to the first table and then in the report reference StatusDescription

    Table2

    Status StatusDescription
    1 Ongoing
    2 Development
    3 Idea
    4 Completed

    When I run the report a box pops asking for the StatusDescription parameter.

    Thanks and sorry for the initial posting mistake.

    I read about the Switch Function, but as you stated that is not the optimal methold

  4. #4
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    So, if these are related to the records in the report, then the status table should be in the report's record source and link from status ID to the table which stores the status ID. But the description needs to be what is included in the report's record source so that it can be chosen as the field to display for your status.

    I hope that makes sense.

  5. #5
    Waubain is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    25
    Yes that makes sense and I believe that is what I am trying to do. As long as I am on the right track then I will keep messing.

    Thank you for your help.

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

Similar Threads

  1. Replies: 0
    Last Post: 05-03-2011, 05:58 AM
  2. Option Group - Borders are gone
    By cevatyildiz in forum Forms
    Replies: 0
    Last Post: 04-30-2010, 06:08 AM
  3. Option Group
    By huskies in forum Forms
    Replies: 9
    Last Post: 12-02-2009, 12:06 PM
  4. option group in form
    By mawa4492 in forum Forms
    Replies: 1
    Last Post: 08-05-2009, 02:49 PM
  5. Option Group broken out
    By dcecil in forum Reports
    Replies: 3
    Last Post: 04-21-2009, 10:30 AM

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