Feeding SubForms w/Combo Boxes?

alderei

New member
Local time
Today, 12:52
Joined
Aug 15, 2007
Messages
4
Okay, this is difficult to explain. I'm a self taught user, and I'm having difficulty with a problem on a form.

I have a database of 401(k) information. Officers have plans, plans have mutual funds, mutual funds have returns data. All of it gets reported in various ways.

I want to create a data-entry form so that users can alter the fund lineup of a plan without seeing any other data.

I've created a form that allows a user to select the officer first. That selection feeds another cbo box of plan names. What I want to do now is have it so that when a plan is selected, the bottom half of the form populates every fund option the plan currently holds. Then the user can alter those as they see fit, deleting some, adding new ones, or editting current ones.


I can't figure out how to make that step happen. Any ideas?
 
Last edited:
I'm bumping this up and including a small example database to work with. All tables and forms necessary are included, except for the subform for mutual fund names and tickers, as I can't figure out how to get that to load.

Whenever I attempt to work it out, I just get a "#Name?" error.

Thanks for any help you guys/girls can thing of!
 

Attachments

BREAKTHROUGH!!!


Okay, I got it to work by inserting a subform, applying the appropriate SELECT Query to the record source and then adding a "Requery" line to the appropriate combo box in the code.

Now it works just as I hoped...which of course means I'll have a host of other problems refining it.

Now to mimic the solution on my real database which is substantially larger....


By the way, This was the SELECT query line I added to the subform:
SELECT [FundbyPlan].[FundTicker] FROM FundbyPlan WHERE (([FundbyPlan].[PlanName])=([Forms]![PlanInfo]![cboPlanName])) ORDER BY [FundbyPlan].[FundTicker];

And this was the Requery line I used in the code:
Private Sub cboPlanName_BeforeUpdate(Cancel As Integer)
Me.subFundbyPlan.Requery
End Sub
 

Users who are viewing this thread

Back
Top Bottom