MS Access 2000 - Changing Subforms within a form
MS Access 2000 - Changing Subforms within a form
(OP)
Heeellllppppp. I've got to a sticking point and the books and Help function don't seem to get me any further.
I have a number of tables and I would like to display the information in one form. I don not wish to display all of the tables at once, only one at a time.
I thought of doing this by having a main form with buttons on and then having subforms that would change when the various buttons are pressed.
I understand that the code:
stDocName = "DaltonTest"
DoCmd.OpenForm stDocName, , , stLinkCriteria
will open a new Window with the form in but this ain't what I want. Does anybody know of a way of opening a form in the way I want, or am I totally going around it in the wrong way?
Any help would be much appreciated.
I have a number of tables and I would like to display the information in one form. I don not wish to display all of the tables at once, only one at a time.
I thought of doing this by having a main form with buttons on and then having subforms that would change when the various buttons are pressed.
I understand that the code:
stDocName = "DaltonTest"
DoCmd.OpenForm stDocName, , , stLinkCriteria
will open a new Window with the form in but this ain't what I want. Does anybody know of a way of opening a form in the way I want, or am I totally going around it in the wrong way?
Any help would be much appreciated.
RE: MS Access 2000 - Changing Subforms within a form
However, if you really, really want to house six tables in one form without joining them, I think your subform idea will work as well as anything can. Just use your selection buttons to hide all the subform controls except the one corresponding to the button, which you unhide. I can't guarantee the performance will impress anybody when you open the main form, though--Access will have to run the queries under all the subforms before it displays anything.
There is another possibility in the special case that the fields you want to display are all the same regardless of which table they're in. In this case, you could use just one form and change its Record Source to the appropriate table. Refresh the form and you're done.
Rick Sprague