Record Arrange by "ID" (1 Viewer)

smtazulislam

Member
Local time
Today, 08:40
Joined
Mar 27, 2020
Messages
806
In the attached picture I have still Data in the YELLOW label.
I would like arrange to GREEN color table for display in Query and Report. I don't know, it possible in access.

Need experts opinion....

Capture.PNG
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:40
Joined
May 7, 2009
Messages
19,245
you create a Query between transfer and expense table.
Joining transfer.transferID with expense.transID.
 

smtazulislam

Member
Local time
Today, 08:40
Joined
Mar 27, 2020
Messages
806
@arnelgp thnak you very much for your comment. Hello Sir, Before my data in the excel file Now I arrange in the access. Its my personal Cost for using this dB. Family members Cost review Like, My parent, sister, brother, my son and family other member is study, I have to send money every month ONE or TWO Bank account.
then they're transfer to each members who need money.
so, I want to keeping record for every single cost. Hope you understand

As per first message, I just add one more table "tblWithdraw" Because to know each Bank Account Balance.
My main 3 tables, tblTransfer , tblWithdraw , tblExpensive.
 

Attachments

  • Family Expense_V4.1.accdb
    1.1 MB · Views: 233

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:40
Joined
Feb 19, 2002
Messages
43,293
I don't see any relationship between the two tables. unless the join is BeneficiaryID to MemberID. But then the result table doesn't make any sense. Please tell us how the two tables are related.

There are property settings for controls in a report that allow you to hide "duplicate" values. These are NOT available for forms or queries.
 

smtazulislam

Member
Local time
Today, 08:40
Joined
Mar 27, 2020
Messages
806
I don't see any relationship between the two tables.
thank you very much for your comments....
20.jpg

Here I mentioned by numbers for relations to each others. Hope you understand.....
unless the join is BeneficiaryID to MemberID. But then the result table doesn't make any sense. Please tell us how the two tables are related.
I change the relationship between tblWithdraw and BeneficiaryID.
Is this okay ?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:40
Joined
Feb 19, 2002
Messages
43,293
You might want to rethink your schema. Members and beneficiaries should be ONE table not two. People are people. You would not have a Withdraw table. You would have a Transaction table with from/to accounts and I'm not sure what PaymentType is so please explain that.
tblTransaction
TranID (autonumber PK)
FromMemberBankID (FK to tblMemberBank)
ToMemberBankID (FK to tblMemberBank)
Reason
Amount
TranDT

The account info should be in a junction table. Putting it in the member table limits you to a single account per person and that might not be flexible enough. So you need a bank table to define the banks and you need tblMemberBank to link each member to one or more banks The account number goes in this junction table because account is a function of a member at a bank so can't go into either of the 1-side tables.


Chew on that for a while and see if you can implement it. If not, post a copy of the db and we'll help you.
 

smtazulislam

Member
Local time
Today, 08:40
Joined
Mar 27, 2020
Messages
806
You might want to rethink your schema. Members and beneficiaries should be ONE table not two. People are people. You would not have a Withdraw table.
Hello Sir, Thanks for your comment and advice.
Here is one think. Beneficiary 5 accounts only. In the future maybe to added more. I will transfer money to nearest beneficiary for giving hand cash.
Then they're reply to me the total cost descriptions. Actually my family 6 members is students And 4 is study in college . So, specially I want to know, where their are expense sending money. Because, I can't take-care of both
But Member is day by day increase. Before member is 5, now it was 9. And many members is not open account.
So that I put like that..
Any suggest this issue.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:40
Joined
Feb 19, 2002
Messages
43,293
Did you think about my suggested schema changes?

Lesson #1 = NEVER design an application assuming a fixed number of anything once you have more than one. When you have more than one of something, you have many. It doesn't matter at all how many members you have. How many beneficiaries. How many banks or how many accounts. Once you have more than one, you can have a million. The actual number of "things" is only relevant when estimating the total size of the database.

If members come and go, you can include an inactive flag to remind yourself that they can't send or receive. Assuming you are doing bank transfers, everyone needs a bank acount or PayPall or whatever. They need some way to receive or send money. I suppose you could create a bank named Cash if you wanted to actually send cash.
 

smtazulislam

Member
Local time
Today, 08:40
Joined
Mar 27, 2020
Messages
806
1) qryTotalCostByExpenseType
2) qryBankAccountBalanceByMembers
3) qryTotalExpenseByMembers
All of the query would like to update in the tables.
 

Attachments

  • Family Expense_V5.1.accdb
    1.5 MB · Views: 209

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:40
Joined
Feb 19, 2002
Messages
43,293
1. Balances do not need to be stored. They should be calculated on the fly.
2/ Date is the name of a Function. Do NOT use the names of functions or properties as column names. What do you think will happen if you type Date in code? Will you get today's date or will you get the date of the current record?
3. Your table design allows for only ONE bank account per person. Inflexible and unnecessary.
4. What is the purpose of ExpenseDetails? I thought this app was just to track transfers between individuals. Same question about Withdrawals. Both would be transactions. All transactions should be in a single table so you can sum them easily to get a current balance.

Transaction types:
Deposit
Withdrawal
Transfer

All have From and To attributes.

NONE of your "to" tables have a "to" attribute

If you want to keep an actual general ledger, buy the cheapest version of Quicken you can find. It still allows for multiple accounts and will actually manage the account actions.
 

smtazulislam

Member
Local time
Today, 08:40
Joined
Mar 27, 2020
Messages
806
1. Balances do not need to be stored. They should be calculated on the fly.
I would like to display in the current record when I will entry data in the expense
2/ Date is the name of a Function. Do NOT use the names of functions or properties as column names. What do you think will happen if you type Date in code? Will you get today's date or will you get the date of the current record?
I get it. All I have change but forget to change in the table tblExpenseDetails.
3. Your table design allows for only ONE bank account per person. Inflexible and unnecessary.
My two members is one person in three banks 3 accounts. All of you it. They are the problem when you transfer to the same bank then you get a free transfer. But If you do have not the same bank you will pay the transaction fee. So I would like it.
4. What is the purpose of ExpenseDetails? I thought this app was just to track transfers between individuals. Same question about Withdrawals. Both would be transactions. All transactions should be in a single table so you can sum them easily to get a current balance.
I have explained in msg #8. My many members is students. They need it every month money. Some students are not allowed to open an Account. They use subAccount from their mother and with a legal bank "Power of Attorney ".
So, They withdraw money from ATM. Their mother should know how much money they withdraw and how much balance they have in their subaccount.
Transaction types:
Deposit
Withdrawal
Transfer

All have From and To attributes.

NONE of your "to" tables have a "to" attribute

If you want to keep an actual general ledger, buy the cheapest version of Quicken you can find. It still allows for multiple accounts and will actually manage the account actions.
This part I don't know what is you exactly explain to me. I think you talking about UNION.
If right! Actually, I want history form to know all about a member ALL TRANSACTION & EXPENSE.

If you have a better Idea ! can you edit or give a demo.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:40
Joined
Feb 19, 2002
Messages
43,293
I pointed out earlier that you can be more flexible with the design now and it will save you from having to make changes later. I've developed a lot of applications. I have a very good sense of what things are actually cast in concrete and unlikely to change and what things are likely to change. Think of this as defensive driving. You don't hit the car that cut you off because he was wrong. You avoid him and maybe make an obscene gesture. When you are on the highway, you don't want to be trapped without an escape plan. This is the same thing. Do you have more than one bank account? I do. I have one personal checking account, one for the household, and another for my business. They happen to be at the same bank but my other accounts are at different banks. To make an assumption this early in the design that no one would ever have more than one account is very shortsighted.

One of my good friends didn't like the way her husband balanced the checkbook so she kept the master and gave him a "sub" ledger. She would "transfer" spending money to "his" account. It was all one account. You are not actually doing the transfers. You are just tracking them so you can make the child's account number 123456-sub and the parent's 123456 if you want to.

As long as the type of transaction is stored, you can report whatever you want. Add a Category field so you can distinguish Expenses from Withdrawals. Add a description field so you know the expense was for milk.

Regardless, you need the "to" fields in the tables so you know to whom the money went. All you have right now is who sent it (MemberID)

If you have a better Idea ! can you edit or give a demo.
I told you what I thought the schema should look like. You made some changes.

I can modify the tables but I'm not messing with the forms. I don't know why your forms are popup and model and open to a "new" record. How do you look at existing data? There is NO reason to have code in the load event that goes to a new record. There is a form property for that so you can open the form to view or to add. That allows you to use a single form for BOTH adding and editing. You do not want to put yourself in the position of having to manage the same validation code on two versions of a form and that is what will happen once you realize that validation is required in order to avoid bad data.

Is this a task you've set for yourself to learn how to create a database? Or, is this something you really need. Here is an Austrailinn company that offers a "free" version. I am always leary of "free" stuff since no one develops software to give away for free. If the software is "free", YOU are the product but it looks like they also have paid versions. Using a product like this, you would need to equate "members" with checking accounts since the product is for a single person.

Free Personal Finance Software. Download Includes Easy Checkbook Register (nchsoftware.com)

Take a look at this software and see if it makes sense to you.
 

smtazulislam

Member
Local time
Today, 08:40
Joined
Mar 27, 2020
Messages
806
One of my good friends didn't like the way her husband balanced the checkbook so she kept the master and gave him a "sub" ledger. She would "transfer" spending money to "his" account. It was all one account. You are not actually doing the transfers. You are just tracking them so you can make the child's account number 123456-sub and the parent's 123456 if you want to.
Actually you misunderstanding there. A mother have many bank Accounts and SubAccount in under her main account. She is give permission by Power of attorney to use subAccount to her child.
NOT husband checking wife account or Wife checking husband account. This is child and mother. Because every child and little members living between city for study.
it's not meet with my custom database.

Can you edit my sample copy... To see what you exactly want to do. Form I will manage it.
I would the required query result as
1) qryTotalCostByExpenseType
2) qryBankAccountBalanceByMembers
3) qryTotalExpenseByMembers
and table design (if better).
 

smtazulislam

Member
Local time
Today, 08:40
Joined
Mar 27, 2020
Messages
806

In explanation about the family personal expense with Pat Hartman

have anyone any others idea to complete this database ? I would like easily use it.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:40
Joined
Feb 19, 2002
Messages
43,293
Actually you misunderstanding there. A mother have many bank Accounts and SubAccount in under her main account. She is give permission by Power of attorney to use subAccount to her child.
NOT husband checking wife account or Wife checking husband account. This is child and mother. Because every child and little members living between city for study.
It was an attempt at an analogy that apparently got lost in the translation.

I redid the structure and I modified the bank form. I changed the Fee to a percent and assigned it to the Account. When you create the transfer, you would calculate the FeeAmt by multiplying the TranAmt by the FeePct from the Bank table. OR you could just store the FeePct. This is NOT a violation of normal forms since the fee can change over time and what it was at the time the transaction was created is what is being saved. This column can never be updated by the user. It is only added to the record when it is initially created. The second instance of the MemberAccounts table is not a duplicate. It is simply a method used by the Relationship window to allow you to make two SEPARATE relationships with the same table using the window. I also added some special accounts in the Bank table to represent cash.
FamilyBankSchemaJPG.JPG
 

Attachments

  • Family Expense_V5.1_Pat.accdb
    1.6 MB · Views: 201
Last edited:

smtazulislam

Member
Local time
Today, 08:40
Joined
Mar 27, 2020
Messages
806
Thank you very much. Its almost of my required. Appreciate for given times.
There are missing the tblExpenseDetails table. My opinion that relationship would like that picture.
But require your opinion ....
Capture.PNG



Why require Expensive Details?
Example :
My son Mobile Account, I will transfer 15000 BDT. This estimate money for his Admission fee, School Tutorial fee, Private Tutorial Teacher fee And School Hostel fee.
Here I want to each part of expense how much money he will be pay that record.
Please give me a advice about the Expense Details.
 

Attachments

  • Family Expense_V5.1_Pat2.accdb
    1.6 MB · Views: 210

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:40
Joined
Feb 19, 2002
Messages
43,293
Please look at the transaction table again. It is used for ALL events regardless of what type. That means that there is no need for a separate table for Expenses which only needs to be populated for Expense transactions. You should have code in the form's BeforeUpdate to ensure that ExpenseType is populated when necessary. Having a separate table just complicates your reporting.

t's not meet with my custom database.
It is far from an exact match since it does so much more AND it is intended to be used for the accounts of a single person. I explained how you can think outside the box and make it work for you.

I'm not sure what more I can do for you. You have your opinion on how the tables should be designed. I have mine. I'm pretty sure my experience trumps yours but it is your application and you have to build it and maintain it so do what you want. I was trying to make your life easier by giving you a sound schema. But like anything free, my advice might not hold value for you. Good luck:)

PS. If the expenses are for your own personal use and have nothing to do with the account transfers, then the ability to track them should not be in this application. Make a separate database to work as your checkbook.
 

smtazulislam

Member
Local time
Today, 08:40
Joined
Mar 27, 2020
Messages
806
Hello Sir, Thank you very much and I apologize for the late reply. I am busy with other work. I will try to add some data and then I will reply to you about what I face problems.
I know you are much times expense with me free advice. I appreciated.
And I hope you will be with me before completed my database.
 

smtazulislam

Member
Local time
Today, 08:40
Joined
Mar 27, 2020
Messages
806
Each transfer have many cost list.
Example:
As per I am explain in the picture for one member NAIF Cost details.
How can I entry please be advice. And how I know the Balance of Naif.


Untitled-3.jpg
 

Attachments

  • Family Expense_V5.1_Pat3.accdb
    3.5 MB · Views: 203

Users who are viewing this thread

Top Bottom