Hello everyone,
I'm working on a Microsoft Access database to track transactions and monthly allocations, but I've run into a few challenges. I’d appreciate any guidance, modification, addition or subtraction on the following issues:
The purpose of this database is to track my daily, weekly, and monthly transactions, analyze my spending patterns, and make informed decisions to improve my savings.
1. Auto-Populating the Weekday Based on Transaction Date
- I have a tblTransactions table where I enter transaction records.
- I want the Week_Day column to be automatically populated based on the Trans_Date field.
- I am using a form called frmTransactionEntry to enter records into the database.
2. Updating Allocated Amount & Actual Spent Automatically
- Every time I enter a transaction using frmTransactionEntry, I want the Amount to be deducted from the Allocated_Amount for the respective category in tblMonthlyAllocation.
- The Actual_Spent column should be updated accordingly, and the Balance should reflect the new amount left for that category in the given month.
3. Handling Negative Balances & Zero Transactions
- If the Actual_Spent exceeds the Allocated_Amount, the Balance should display a negative amount.
- If no transactions have been recorded for a category, both Actual_Spent and Balance should show zero instead of being empty.
I've tried using queries and VBA, but I keep running into errors such as type mismatches and non-updatable queries. Any help or alternative approaches would be greatly appreciated.
TABLE DETAILS1. tblCategories
This table contains three columns:
- Categories_ID (Short Text) – An abbreviation of the category name (e.g., Grocery = GROC, Transportation = TRANS, Medical/Health = MED/H).
- Categories_Name (Short Text) – The full name of the category, such as Grocery, Medical/Health, Transportation, Bills, etc.
- Type (Short Text) – Specifies whether the category is for income or expense.
2. tblMonthlyAllocation
This table tracks allocated amounts and spending for each category per month. It consists of seven columns:
- Allocation_ID (AutoNumber) – Unique identifier for each record.
- Month_Year (Date/Time) – Represents the month and year of the allocation.
- Allocated_Amount (Currency) – The budgeted amount for a specific category in a given month (e.g., Grocery = 200, Medical/Health = 100, Transportation = 50).
- Actual_Spent (Currency) – The total amount spent in a category for the month.
- Balance (Currency) – The remaining amount after spending.
- Categories_ID (Short Text) – Links the record to a category in tblCategories.
- Note (Long Text) – Provides additional details about the allocation.
3. tblTransactions
This table records individual transactions and contains eight columns:
- Trans_ID (AutoNumber) – Unique identifier for each transaction.
- Week_Day (Short Text) – Stores the day of the week (e.g., Sunday to Saturday) based on the transaction date.
- Trans_Date (Date/Time) – The date of the transaction.
- Amount (Currency) – The amount spent on the transaction.
- Payment_Method (Short Text) – Indicates how the transaction was paid (e.g., cash, credit card, visa card).
- Categories_ID (Short Text) – Links the transaction to a category in tblCategories.
- Shop_ID (Number) – Identifies the shopping center where the transaction took place.
- Description (Long Text) – Provides additional details about the transaction.
4. tblShoppingCenter
This table stores details about shopping locations and consists of three columns:
- Shop_ID (AutoNumber) – Unique identifier for each shop.
- Shop_Name (Short Text) – The name of the shop where the transaction occurred.
- Address (Short Text) – The location or address of the shop.
Thanks in advance for your time and expertise!