Passing values from parents to subs

Mmattson

Registered User.
Local time
Today, 16:20
Joined
Oct 28, 2002
Messages
46
Access 2003

I have a form that is designed for semi-technical and non-technical to enter budget plans for the upcoming year. The form is based upon 5 primary tables/objects (Employees, Trade Associations, Membership, Conferences).

Employees:
Trade Associations:1 to many with Employees
Membership items: 1 to many with Trade Associations
Conferences: 1 to many with Trade Associations
Conferences Items: 1 to many with Conferences

The challenge is in the relationship between Trade Assocs > Conferences > Conference Items


I need the Conference Items to roll up to the Trade Association level. So I have used some VBA to pass values from parent to child form. The problem is that the TradeAssocID only populates on the first Conference Item, all following items are null.

Code:
Me![Expense Details subform2].Form!fkTradeAssocID = Me!TradeAssocID

I have done this successfully before, so I am frustrated. What am I missing. If the DB is helpful, I can post.
 
Here it is. It has basic protection (Shift key).

The form in question can be found as a sub in the Marketing Budget form. It is in development, hence some of the sloppiness.
 

Attachments

The solution I am working with now is to use a (pseudo) bridge table I have to update the field by executing an update query onExit.

Code:
CurrentDb.Execute "Qupd", dbFailOnError

This works. :rolleyes: If there is a better way, I'm still open. I am also still curious why it is only setting the value of the first sub-record.
 

Users who are viewing this thread

Back
Top Bottom