Banks::BankID (auto-entered serial no) = Transactions::BankID (number field)
Banks::BankID = Accounts::BankID
Accounts::AccountsID = Transactions::AccountsID (Remove BankID from transactions and put it in Accounts instead)
In the previous relationship, enable "allow creation of records via this relationship" for Transactions.
Accounts::Sub AccountID = Sub Account::AccountsID (Sub Account is a table occurrence of Accounts)
That's the basic structure to your tables. Table occurrences are what we call the "boxes" used to define relationships between tables in Manage | Database | Relationships. To make a new table occurrence of an existing table, click it's table occurrrence box to selecte it, then click the button with two green plus signs to make a copy of of it. Then you can double click it to rename it as needed.
Now for your portal:
We need a relationship where you can control what transaction records are visible in the portal. We could use the pop ups to directly control what records appear in your portal, but let's try a simpler approach to start:
Go to the Accounts Layout and add a portal to Transactions on it. This portal, as currently set up, will show all transactions for that account for all dates. If you use a date to filter this portal, you can limit the list of specific records to a specific date or range of dates. To select a different account, you can simply perform a find for the appropriate account record which enables you to select the account or sub account for which you need to edit transactions.
Exactly how you filter the portal records by date will depend on your needs here. Do you want to see all transactions on or after a specified date? All transactions for one specific day? All from date1 to date2?
Thanks for your reply and sorry for my late reply, I was abroad..
I will try your way and let you know the result and also your questions..
If you have FileMaker 11, you can use a portal filter to limit the transactions shown to a given date. Define a date field in Accounts, selectedDate and then you can use this filter expression:
Accounts::SelectedDate = Transactions::Date
To limit the transactions shown to just the specified date. You can set an auto-enter calculation on Transactions::Date to enter the date from SelectedDate so that new entries in the portal automatically get the same date as that specified in the portal filter.
If you use this approach, put an OnObjectExit script trigger on SelectedDate and set it to run this script to force the portal filter to update each time you select a different date:
RefreshWindow [Flush Cached Join Results]