Results 1 to 7 of 7
  1. #1
    Jayfaas is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    7

    Getting radio button to display text in a report

    I have a database I use at work for writing up non-conformance reports and we have 5 different dispositions(see picture) but when we run our report, they show up as numbers(1-5). I want to know how to get them to show up as text. I went into the main table and changed the "disposition" category to text and changed each button to show what text I wanted it to but for some reason it wont save. When I go back and click the radio button and bring up the properties, it reverts back to a number. I just want our dispositions to show up as the text(Use As Is, Rework, RTV, etc) instead of numbers when we run our monthly report. Can anyone tell me what I am doing wrong?



    Click image for larger version. 

Name:	picture.jpg 
Views:	13 
Size:	106.2 KB 
ID:	16958

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    Let the Disposition field in your table be numeric
    Option1- Create a table with two fields. PK as DispositionID (AutoNumber) and DispositionName (Text). Use this table joined on the Disposition field in your current table as the report's recordsource.
    Option2- If the number of Disposition types are not going to change, then a table is not required. In the report, drag the disposation field and set its visible property to no. Add a textbox to the report with its controlsource as -
    =IIf("Disposation"=1,"Use as is",IIf("Disposation"=2,"Rework", ...)) ' Complete the nested statement
    Edit :
    Option3 - See here http://www.fontstuff.com/casebook/casebook05.htm

  3. #3
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    You can also use the Choose function, which returns a specific value from a list based on an index (pointer) value.

    Your's might look something like this:

    Choose([Disposition], "Use as Is", "Scrap", "Rework","Void","RTV")

    where the five text values in the list correspond to the values 1 - 5 of [Disposition]

    John

  4. #4
    Jayfaas is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    7
    I apologize but I am not really savvy with the access lingo. Please see the picture below. I was changing that 1 to Use As Is because that was the button that was selected, but it always changes back to 1. I made sure to go into the main table where that field is and change it to text but that didnt help. Where would I use these functions you spoke of?Click image for larger version. 

Name:	picture2.png 
Views:	11 
Size:	65.9 KB 
ID:	16959

  5. #5
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    You would use them in the report. The [Disposition] option group always has a numeric value, and each of the options (radio buttons in your case) also have numeric values. So the associated database field must also be numeric. You want to see the Text equivalents on the report, so the report control for [disposition] will use the function in its Control Source to convert the numeric value of [disposition] to the corresponding text.

  6. #6
    Jayfaas is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    7
    Ok I went into design view on the query and under the disposition field I put "Choose([Disposition],"Use as Is","Rework","RTV","Scrap","Void")" and when I click out of it into another field, it changes it to "Expr1: Choose([Disposition],"Use as Is","Rework","RTV","Scrap","Void")". If I leave it there and run the query, it brings up the disposition field as "Expr1". If I try to put "Disposition: Choose([Disposition],"Use as Is","Rework","RTV","Scrap","Void")" it gives me the error "Circular reference caused by alias 'Disposition' in query definition's SELECT list". Is there something I can change or rearrange to have the field in the query named Disposition?

  7. #7
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Instead of Disposition: Choose.... use something like Disposition_Text: Choose.... in the query.

    As you saw, you cannot give the alias (Disposition the same name as one of the fields in the expression.

    The report will include Disposition_Text as one of the fields you can select.

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

Similar Threads

  1. Radio Button Question
    By data808 in forum Access
    Replies: 2
    Last Post: 05-10-2014, 01:27 AM
  2. Replies: 2
    Last Post: 02-16-2013, 04:32 PM
  3. Display Average as a radio button
    By boo in forum Forms
    Replies: 4
    Last Post: 02-01-2012, 12:28 PM
  4. Replies: 2
    Last Post: 02-01-2012, 07:35 AM
  5. radio button and checkbox
    By Fifa in forum Access
    Replies: 2
    Last Post: 01-19-2011, 10:20 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