Subform in new window, relate it with main form?

capsula4

Registered User.
Local time
Today, 10:17
Joined
Jan 3, 2008
Messages
122
Here is my DB:

problemrg4.jpg


What is in red is what I'm creating in the form.

Additional Info about the DB for better understanding: One day has dif companies, each company has dif banks, and each bank has a quantity of available money for that day.

1 DAY - many COMPANIES
1 COMPANY - many BANKS

Each COMPANY and BANK relationship is stored in tblRelationships:

ID_REL, ID_COMPANY, ID_BANK

So I have this form:

"DAY_ID, DAY, COMPANY" (company i just use it as a filter for the subform, so as to display the banks of that company only)

and I have this other form: "BANK, MONEY TODAY, DAY_ID"

I tried linkin them as a subform inside the main form but the filter didn't work really great since it was necessary to browse another record and come back so as to see the subform updated. Tried using macros but didn't work, neither "Update Form" button.

So I decided to put a button "ENTER VALUES" in the main form ("DAY_ID, DAY, COMPANY") and not its better updated. The problem here is that when the subform opens, it doesn't has "DAY_ID" filled in which is the field which is relating both forms. How can I create this relationship?



 
Last edited:
It was as easy as using a default value on second form, refering to the main form. :D:D

Easy but took me a couple of days to realise of that :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom