Tab Control Using Unbound SubForms

sambo

Registered User.
Local time
Today, 13:54
Joined
Aug 29, 2002
Messages
289
I have created four forms that are completely independent of each other. I would like to put them all into on Tab Control in order to make them easily accessible.
None of the forms are bound to any tables. My method of posting to table simply retrieves data and enters values into tables via code. So, All of my controls are unbound. For this reason I am getting the error "Can't build a link between unbound forms".

Is there a way to just put a working form on a tab control simply for aesthetic value. I don't want it bound to anything, i just want it to sit there and do its job.

When I do this and open the MainForm, I get an input box asking me for the parameter of my combo box.
 
Tab controls are a pain in the rear. I've only experienced them working if you place the controls directly on the tab and plan the application design to use tab controls. Backfitting a form onto a tab usually doesn't work. The tabs want to act like the parent of a parent/child relationship when you drop an existing form on them.

-Al
 
I figured as much. Doesn't that make forms look kind of uncomfortable on the screen? If the user has 4 or five forms that they may be using and updating at one time, the screen can get crowded quick, any suggestions on how to keep this crowding down.
 
I use subforms on tab forms all the time with no problems. Sometimes the subforms form a set and are all linked to the tab form via the master/child links so they will be synchronized and sometimes they are independent. However, I do not use unbound forms.

What is the point of writing code when Access handles bound forms properly and saves you all that coding and testing and debugging? If you're that into code you should be working in VB or C++.

The message indicates that you are trying to use the master/child links. These do not work with unbound forms/subforms. There are no recordsets for Access to synchronize. Hence no link is possible.

Once you put a form on the tab control of another form, it becomes a subform. Therefore, if your combo's query is referring to a form field, you will need to change the reference.

Forms!YourMainFormName! TheNameOfTheControlThatHoldsTheSubform.Form!YourControlName
 
Pat,
From what I gather, I form is either an independent form or a subform, it cannot be both. I think this is where my breakdown has been occuring.
I'll try the reference change.

Thanks
 
Brilliant..
It worked for the first tab.
 
Cool. I'll file this one away myself. Probably save me a lot of heartache in the future!
 
Thanks for your help pat,
I have been trying to do something similar to this for quite a while now, and have had no success up to this point. I'm sure all my users would thank you if they knew the implications. As it is, they probably will never have a clue. Such is life.
 

Users who are viewing this thread

Back
Top Bottom