Hi there,
I'm working on a project that requires a fairly flexible data entry form. To help illustrate why I’m going to start by describing the table that will eventually store the data.
The table is essentially a journal that records account transactions. Every time an account balance changes an associated journal entry is created.
For instance if I were to add $10,000 to Account#1 the entry would look like:
Account#1 +$10,000
If I were to later decrease the balance of this account by $5,000 the entry would look like:
Account#1 -$5,000
At any given time I can see the actual account balances by running a query that sums the amount and groups by the Account#.
Increasing or decreasing a single account balance is fairly straight forward. The issue arises when complex transfers take place.
For instance, if I wanted to transfer $2k from Account#1 to Account#2 and $2k from Account#1 to Account#3 the entry would look something like:
Account#1 -$4,000
Account#2 +$2,000
Account#3 +$2,000
As you can see this will result in 3 new records in the Journal table.
So first off, the data entry form must give users enough flexibility to add as many records as they require to complete a single transaction.
Next – prior to these records being appended to the actual journal table a number of logic checks must take place.
For instance:
Data Validation Rule #1 - The account (in this case Account#1) cannot be decreased into a negative balance.
Data Validation Rule #2 – The total Debits & Credits balance. In this case Account#2 & Account#3 are increased by a total of $4k. Account#1 is decreased by $4k. i.e. Total increases = total decreases.
Now that I’ve bored you all half to death I’m going to get into my actual question. How do I go about creating this data entry form? I don’t want any of these 3 records to be appended to the Journal table until the users specifies all of the appropriate lines & then clicks a command button. The command button click event will then trigger the data validation logic and thereafter launch a procedure to append the records to the Journal table.
My first thought was to create a disconnected/dynamic/custom recordset that users can manipulate. When they’re content they fire the click event. If all is well the records are then appended to the Journal and the dynamic recordset is dumped. My concern is I may be heading in the wrong direction. What are your thoughts on using the recordset approach? Is there are more effective way?
Thanks -Izzy
I'm working on a project that requires a fairly flexible data entry form. To help illustrate why I’m going to start by describing the table that will eventually store the data.
The table is essentially a journal that records account transactions. Every time an account balance changes an associated journal entry is created.
For instance if I were to add $10,000 to Account#1 the entry would look like:
Account#1 +$10,000
If I were to later decrease the balance of this account by $5,000 the entry would look like:
Account#1 -$5,000
At any given time I can see the actual account balances by running a query that sums the amount and groups by the Account#.
Increasing or decreasing a single account balance is fairly straight forward. The issue arises when complex transfers take place.
For instance, if I wanted to transfer $2k from Account#1 to Account#2 and $2k from Account#1 to Account#3 the entry would look something like:
Account#1 -$4,000
Account#2 +$2,000
Account#3 +$2,000
As you can see this will result in 3 new records in the Journal table.
So first off, the data entry form must give users enough flexibility to add as many records as they require to complete a single transaction.
Next – prior to these records being appended to the actual journal table a number of logic checks must take place.
For instance:
Data Validation Rule #1 - The account (in this case Account#1) cannot be decreased into a negative balance.
Data Validation Rule #2 – The total Debits & Credits balance. In this case Account#2 & Account#3 are increased by a total of $4k. Account#1 is decreased by $4k. i.e. Total increases = total decreases.
Now that I’ve bored you all half to death I’m going to get into my actual question. How do I go about creating this data entry form? I don’t want any of these 3 records to be appended to the Journal table until the users specifies all of the appropriate lines & then clicks a command button. The command button click event will then trigger the data validation logic and thereafter launch a procedure to append the records to the Journal table.
My first thought was to create a disconnected/dynamic/custom recordset that users can manipulate. When they’re content they fire the click event. If all is well the records are then appended to the Journal and the dynamic recordset is dumped. My concern is I may be heading in the wrong direction. What are your thoughts on using the recordset approach? Is there are more effective way?
Thanks -Izzy