A Main Form, 4 SubForms, And a Control Box...

MamadouNdaw

Registered User.
Local time
Today, 22:44
Joined
Nov 14, 2007
Messages
17
I'm sure there are many ways to do this, so I'd like a recommendation as to the best method. First, an overview:

The database revolves around entering transaction data to draw a general picture of all money in and out with regards to a small business. All transactions filter through a main transaction table based on 4 categories: Sales, Inventory Purchases, Capital Transactions, and Expenses.

My main form uses the transaction table as a record source, and contains a subform in the detail section that should correspond to the type of transaction to be entered. Thus, I'm using a combo box on the transaction form which should then filter the data to the appropriate tables.

What I would like to do is have the subform dynamically change each time I select a category in the combo box. I assume this can be done fairly simply by inserting the 4 subforms on separate tabs and just have the control change the current tab, but is is possible to load a new subform into the area on click just for aesthetic and data entry purposes?

I would just like to know the best way to do this whether it be macro, vba, or other with perhaps a description on how to accomplish this. Sorry for not knowing anything about access.

Thanks folks
 
Not sure on how to do it, but have seen it done:
Essentially overlay the the 4 subforms in the one location
Based on combo box selection, make that subform visible, all others invisible

Hopefully more experienced users will give you some tips if this sounds like your answer
 
Yeah, I suppose that could work well. But it wouldn't slow the database having 4 subforms open simultaneously despite the fact that 3 are hidden?
 
Yeah, I suppose that could work well. But it wouldn't slow the database having 4 subforms open simultaneously despite the fact that 3 are hidden?

Yes, it would. What we've been doing on a project I'm currently working on is to load the subform at the time it is needed. We use a tab control with a subform on each and then when the user clicks on the particular tab we set the recordsource of the subform.
 
i hope y'all dont mind if i jump in here
i have a similiar situation
a main form with several subforms each on a tab and a combo box that selects a record
each subform has a different table as its record source
(the combo box selects a record that will be the foreign key for each of the subforms record source table)
can you provide me some code that will insert the foreign key selected on the main form's comb box to each of the subforms
thanks in advance
 

Users who are viewing this thread

Back
Top Bottom