98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access Training and help » advanced micorosoft access training - Option groups
advanced micorosoft access training - Option groups
Resolved · Low Priority · Version Standard
Jane has attended:
No courses
Option groups
I have set up an Options Group in my form. and assigne i.e 1- proposed; 2 - confirmed. when creating a report however it comes up with 1 and 2 how do I get it to show proposed and confirmed? As viewers of the report don't know what the numbers are?
RE: Option groups
Hi Jane
I would make sure that the properties for your option group have been set. To do this in the VBA editor, right click the option button and then select properties, this will display the properties menu on the left hand side of the screen. Change the name, caption and tag attributes to say what you want them too. This should solve your problem.
Hope this helps
David
RE: Option groups
I have made these changes and they don't seem to have made a difference? any other advice? DO I not need to link the text box in the report to something perhaps?
RE: Option groups
Hi Jane
If you just right click the option button in the report (design view) click properties and then when the properties window opens, click into the caption box, then just name the option button in there.
You must make sure that you have the exact option button selected, otherwise you will be naming something else.
Hope this helps
David
RE: Option groups
thanks David, I have done this but it is the option button in the form not the report? and I have named it but the report still shows the numbers not the words I have changed the labels and the check boxes and still no difference. Not sure if the problem stems from the table already as it also appears as numbers in the table. Option Group set up in form after table and linked by using the wizard saying store valu in that field? Should I have done something else? Thanks
RE: Option groups
As I said in my previous response, you can actually change the name within the report, if you go into design view of the report then follow the steps previously stated.
David
RE: Option groups
But you only have one text box in the report labelled 'status', so one name how can I put 3 different name in there? Sorry if I am frustrating you but I just don't understand, sorry
RE: Option groups
Sorry Jane, I understood it as though you have the option group on the report itself as well as the form. I should have asked for the exact detail of what you where doing earlier. I will just have a look into this and get back to as soon as possible.
RE: Option groups
Hi Jane
I believe what you are saying is that you have a form, which is the front end of to a table. When you select one of the option on the form, the value that is associated with that option is input into the table. By this I mean that if the option confirmed is selected, this is then input into the table. So why don't you just set up the report so that it takes the data out of the table. It is important to remember that the table holds all of the data, the form itself holds no data at all, it is just an interface for a table. So on the report why not just use the text box and then link it to a query that is carried out on the the table itself. I am not sure exactly what you are trying to show, but if you are trying something along the lines of showing where an order is confirmed or pending, you will need to perform a query on the table to pull out all of the data that you need and then use a report to display all of this data.
So you do not need to worry about the option buttons as the report will be getting the data directly from the table, which will only hold one of the two values. So when taking the data from the query and placing it into a report you will be displaying the exact values held with the database table and not the two option that it could be.
I am sorry I did not pick this up before
Hope this solves your problem
David
RE: Option groups
Thanks David, I am running the report from the table but the problem is that in the table it is storing the values 1,2 & 3 not proposed, confirmed, completed? How do I get the tbale column to show the 'name' and not the value? Thank you
RE: Option groups
Hi Jane
I would advise that the best thing to do would be a small re-design of your system, so that the database column holds the values proposed, confirmed and complete, this means that any one working on the database will understand the data. Please remember that it is important to store meaningful data so that it makes sense. Then just change you form, so that it adds these values to the database instead of 1,2,3. This will mean that the correct data is held in the database which means you should have no problems getting the data you need.#
I know this does seem quite drastic, but it is one of the underlying principles of database design that you store meaningful data, and although 1,2,3 might be meaningful to you, it is not to anyone else. So I do advise that you give you database a proper design then you should have far fewer problems in the future.
Hope this helps
David
RE: Option groups
I totally agree, but how do I do that. Do I still use an option group in the form or just check boxes instead so I don't have values 1,2,3?
RE: Option groups
Hi Jane
If you still wanted to use an option group, you would need to write a small amount of VBA code, which we do offer a course on. However to simplify things, how about using a combo box. This would mean that you would have you three options held with the drop down option box, you select the one that you want and then this value is input into the table. It should put the actual value into the table rather than the numbers 1,2,3.
Hope this solves your problem
David
RE: Option groups
Thanks, I just like the option box as have lots of combo boxes. anyway I will try figure something else out thanks anyway. Can't believe though having done your intermediate and advanced course that something so simple would not be covered as the use of an option box was covered and there was no talk of code in-order to store relevant data?
Anyway, thanks again
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Choosing data types in AccessNot sure which data type to use for your Access fields? Here are some guidelines to help you choose a data type to assign to a field. |