advanced micorosoft access training - option groups
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » advanced micorosoft access training - Option groups

advanced micorosoft access training - Option groups

resolvedResolved · Low Priority · Version Standard

replyReply Tue 12 Dec 2006, 11:32Delegate Jane said...

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?

For upcoming training course dates see: Pricing & availability

replyReply Tue 12 Dec 2006, 11:38 Edited on Thu 21 Dec 2006, 10:38Trainer David said...

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

replyReply Tue 12 Dec 2006, 12:52Delegate Jane said...

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?

replyReply Tue 19 Dec 2006, 11:09 Edited on Thu 21 Dec 2006, 12:35Trainer David said...

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

replyReply Tue 19 Dec 2006, 17:17Delegate Jane said...

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

replyReply Wed 20 Dec 2006, 10:39 Edited on Thu 21 Dec 2006, 10:38Trainer David said...

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

replyReply Wed 20 Dec 2006, 10:44Delegate Jane said...

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

replyReply Wed 20 Dec 2006, 14:16Trainer David said...

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.

replyReply Wed 20 Dec 2006, 14:31 Edited on Thu 21 Dec 2006, 10:37Trainer David said...

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

replyReply Wed 20 Dec 2006, 15:18Delegate Jane said...

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

replyReply Wed 20 Dec 2006, 15:41 Edited on Thu 21 Dec 2006, 10:37Trainer David said...

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

replyReply Wed 20 Dec 2006, 15:47Delegate Jane said...

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?

replyReply Wed 20 Dec 2006, 16:52 Edited on Thu 21 Dec 2006, 10:36Trainer David said...

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

replyReply Wed 20 Dec 2006, 17:22 Edited on Thu 21 Dec 2006, 10:35Delegate Jane said...

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

 

Access tip:

Calculating The Difference Between Dates

If you wish to calculate the time between two date fields, this can be done in a number of ways:

1. As a calculated field in a query
2. As a calculated control in a form or report
3. As a calculation in a VBA procedure.

The basic syntax to get the number of days between two dates is:

=[One Date Field] - [Another Date Field]

You can also use one of the following functions:

=Month([One Date Field] - [Another Date Field])
which calculates the number of months between the two fields

=Year([One Date Field] - [Another Date Field])
which calculates the number of years between the two fields.

Another function is the DateDiff() function.

It uses an argument to determine how the time interval is measured. For example:

=DateDiff("q",[One Date Field] - [Another Date Field])
returns the number of quarters between the two fields.

Other intervals that can be used in this expression are as follows:
"yyyy" - Years
"m" - Months
"d" - Days
"w" - Weekdays
"ww" - Weeks
"h" - Hours
"n" - Minutes
"s" - Seconds

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard