| re: Radio Button
Hi, and Welcome to Bytes!
It appears that your Status field is being represented as a Boolean value - one that is represented by True/False, Yes/No (internally stored as an integer value, -1 for True/Yes and 0 for False/No).
If this is so you can change the formatting of the textbox in your report and apply a custom format to display "Pending" or "Completed" instead of "Yes" and "No". Open your report in design view and select the Status text box. If the properties tabs are not open right-click and select Properties. Have a look at the Format property of the property tabs. It may say Yes/No at present. Change this to the following text: ;"Completed";"Pending"
The opening semicolon is deliberate and must be included.
What this does is to apply a custom format to a numeric value. In this case, there is no format for positive values (>0) - hence the lone semicolon at the start. The text "Completed" is in the second position - which is what to display if the value is negative (<0). The text "Pending" is in the third position - which is what to display if the value is 0. There is no need for a fourth choice in this instance - which would be what to display if the field is null.
Alternatively, if you cannot make this work, you can take a different approach by using a calculated field instead. To do this, select the existing textbox for your status field and change its name property to something not bound to one of the underlying fields in your query or table (e.g. txtStatusText). Change the ControlSource property from Status to =IIF([Status] = 0, "Pending", "Completed")
Both approaches assume that status "Pending" is represented by 0 and "Completed" by -1. If this is not the case the custom format approach is unlikely to work, but the calculated field can easily be adapted by changing the value tested in the IIF statement.
Neither approach requires any VBA at all.
-Stewart
|