views:

658

answers:

2

Ok so this maybe a simple/silly question but I don't know so here goes:

In access let's say I want to have a frame control, so I click the option group button and add it to the desgin surface. However, I am not wanting to use this as a option group with radio button selection, instead I would like to add text boxes instead the frame, so that when I reference the frame, it references every control instead of it, hence the text boxes, cbo boxes, etc.....just as it would if they were radio option selections.

So can you do this?

I want whatever controls I add inside the frame to be easily referenced (i.e. make all controls visible just by using frameExample.visible = true) so that I can build my own tab control groupings.....

can this be done?

Thanks!

EDIT:

What I am trying to accomplish is having a form that includes a collection of controls (input controls - cbo boxes, text boxes, etc), that serve as the Main record information. These are saved to a table via an INSERT statement on button_click because this form is unbound.

Next I have 8 categories that are relative per each main record (and data that goes along with it). Each of these categories could have a sub form area and a button click that bring it's relative form into the sub form area. These sub forms would be unbound as well as I would just save data via SQL statement. So i know I could accomplish this by running the insert statement from the parent form, on the main collection control's data that would create the KeyID number, then run a SQL statement that would turn around and load that KeyID number right back onto the page in a hidden text box.

Then when I click one of the sub forms and load its relative collection of controls, I could then save that data along with KeyID for each of these sub-forms/tables.

SO......

I was wondering if instead you could define these controls as a collection so that you could hide and make visible all the ones you need on button clicks and avoid the need for additional forms (subs). I know that if a user enters data into a text box, and then somewhere along the way that box becomes hidden, the data still exists in it and still ends up in the SQL statement....

So I want all these controls to exist on the same form, but I thought what is I could encapsulate them into a frame like an option group, then I could call the frame and all the relative controls would be called up (made visible) as needed.

Sorry for the long explanation but I thought it would help.

+2  A: 

I do not think you can do it with an Option Group, but what you are describing is pretty much a subform, yesno?

Remou
actually Remou, I was hoping that I could do this with an option group instead of a sub form, because I want to build my own tab control controls....instead of using the built in one. So what I want to be able to do is make collections of controls (text boxes, cbo boxes, etc) visible on non-visible, so that I can sort of make my own tab control. Sub-forms do not allow me to do this because I always use unbound forms and save data via SQL statements (INSERT/UPDATE), and with sub forms, I can't do this with more than one collection at a time.
Justin
Why do you want your own tab control, rather than existing tab controls? I ask, because it may be that there is a different solution available to you.
Remou
formatting....so it can match the look of the rest of the database. that is all. i can use the above approach that i mentioned in the EDIT, but if I can do this I would like to learn how.....but it just boils down to the asthetics.
Justin
this is because you cannot really format the tab control very much at all as far as I know. very limited in the properties window...
Justin
Are you aware that you can create a tab control without tabs and use any control you fancy, including images and labels to activate the page? Do you know that each control has a tag property that can be set to anything you like, including a string that will allow you to operate on a group of controls based on the value of the tag property?
Remou
Use the tab control and hide it. You can then provide whatever controls you want to drive the tab control. I have been doing this kind of thing since 1998 when I didn't like the available options for tab control appearance.
David-W-Fenton
Also, although I do not think this is what you want, it is possible to group controls for design in versions >=2007 : http://office.microsoft.com/en-us/access/HA010448531033.aspx
Remou
actually i think your suggestions are exactly what I am looking for, just did not know how to do it.... just go to each tab and set their visibility to 'no'? what code do you drive the tab selection with?? thanks!
Justin
so could you guys provide me with some instruction on how to get started, or point me to a website, etc....thanks fellas!
Justin
got it guys...thanks for the advice!
Justin
A: 

Some examples of hiding the tab control from an app that went live in March 1998:

Tab driven by transparent command buttons over labels styled to look like colored command buttons: alt text

Same approach, more buttons: alt text

In this case, fake colored command buttons don't drive the tab, but insted show/hide the tab and a subform. In this case, the tab is actually driven by the listbox: alt text

A view of when the tab is hidden and the subform revealed. The listbox drives navigation within the subform, which has a visible tab on it: alt text

So, there's a lot that can be done without showing the tab control.

David-W-Fenton
David - just to be clear before I flag this, does the information listed (company names, personal names, addresses, phone numbers, etc.) on the forms above have permission by Deloitte to be shared publically or is it all ficticious? In it's current format, it appears to be in serious violation of PII standards/ethics.
Otaku
Ack! I used the wrong images -- I had images created with randomized data, but those aren't the ones. I've obscured every identifiable piece of data on the pictures. Thanks for pointing this out -- I don't know exactly how I ended up with the real screenshots on my website, but it probably happened when I migrated hosts a few years ago. Thankfully, nobody looks at my website!
David-W-Fenton