Option button help

yippie_ky_yay

Registered User.
Local time
Yesterday, 20:35
Joined
Jul 30, 2002
Messages
338
Hello Board,

I have taken VB classes, but Access is still pretty new to me. I was wondering if someone could help me with the following:

I have a Personal_Info table and a Group_Info table. Not all people belong to a group, so in my data entry form I have a frame with two option buttons (yes and no) to indicate that they are a group member. The data I'm using is the result of an outer join, so if the "group_name" field is blank, the person does not belong to a group and I would therefore like the "no" option button to be set as a result.

I am familiar with SQL as well - I realise that I will need to create a query that will ask something like:
Select...WHERE (((GROUP_TABLE.GROUP_NAME) Is Not Null));
but my main problems are where to put it in the option button!?!

Any help would be much appreciated!

-Sean
 
Last edited:
An SQL query does not go into an option button or option group. Anyway, you don't need the yes/no options if you're already showing the group name, and you don't even need a query. Just base the form on the Personal_Info table. Use a combo box, populated by all the available groups from the Group_Info table (or by a query or SQL statement based on it), and bound to the common field in the Personal_Info table. If a person belongs to a group, the group name will appear in the combo box; if not, the combo box will be empty (Null).

Since group info is independent of any individual's data (except for establishing which individuals belong to which groups), data entry for the Group_Info table should probably be on a separate form.
 
Thanks for answering Alan!

On a seperate form is where I would like to go in the future! For now though, I'm just testing things.

Your suggestion is basicly how it is set up now. My problem is that the user will be overloaded with information, so I thought if I could have a simple frame displaying either Yes or No to wether or not they were a member, then they could click on a "Group" button to bring up the seperate form as you suggested.

I've actually made some progress since my posting. Basicly, I have a "IF group_name = null then frame = 2 (for false) else frame = 1 (for true)". I can get this to work for a particular even like load or after_update - but is there a way to reflect this in each record you look through? In VB you can create those same arrow buttons and then be able to overwrite them - do you know if this is available in access?

Thanks again!
 
I'm not sure what you mean by the arrow buttons. If you set it up as I suggested, the form will automatically reflect each person's group status as you move from record to record.
 
By arrow buttons, I mean the buttons used to navigate from record to record (with the record number in a text field in the middle) found at the bottom the screen in run mode. Perhaps Data_entry_form wasn't the best title as it will be used to view ALL the records.

The problem is that I can't just display the name of the group anywhere, as someone can belong to many groups. Therefore, I thought it best that if there was just a frame with a yes or no option, the user could press a button (ie "Group Details") that would bring up the relevant information if they wanted to.

Thanks again for all your help!
 
If each person may belong to multiple groups, you could do either of the following:

1. Use a subform to display and edit the list of groups each person belongs to.
2. Use a command button to open a separate form listing each person's group membership(s). In the command button's Click event procedure, you'd use a DoCmd.OpenForm ... statement, which would specify a filter or WHERE criteria to limit the form to only records which match the record currently displayed on the main form; you might also want to specify that the form be opened as a dialog box, so that the user has to finish with it before returning to the main form.

The presence or absence of navigation buttons is controlled by the setting of the NavigationButtons property on each form's property sheet.
 
Thanks Alan!

My option button idea was perhaps more complex than necessary, so I'll just have to abandon it (it's tough though after investing a couple of hours though huh?).

Thanks again!

-Sean
 
Last edited:

Users who are viewing this thread

Back
Top Bottom