[Example] Investment Tracking (record cloning with macro)

Some examples to be used directly
Forum rules
No question in this section please
For any question related to a topic, create a new thread in the relevant section.
Post Reply
User avatar
DACM
Volunteer
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

[Example] Investment Tracking (record cloning with macro)

Post by DACM »

Here's an example database that could be used to track investment transactions for tax purposes.

The real demo here is a macro assigned to a button that clones the current record to a new record. This aids user input accuracy for related buy/sell transactions while selectively reducing overall input redundancy. The Table Control grid aids in selecting a record to be cloned. It became apparent that the Primary Key constraint forced the listing of each column-name in the SQL/macro. This has the added benefit of allowing selected fields to be cloned. For instance, the Date field is not cloned which allows it to default to today's date in new records as setup with SQL in the table structure.

Enjoy!
Attachments
Investment_Tracking.odb
(16.7 KiB) Downloaded 3485 times
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
User avatar
DACM
Volunteer
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

Re: [Example] Quality Assurance (multiple clones with macro)

Post by DACM »

Here's a variation of the same theme (record cloning) in response to a thread requiring partial-record cloning in support of scientific data sampling. The Form features a SubForm used to filter a Table Control (grid) using two linked-fields in common with the MainForm. This example also includes a push-button macro to eliminate records (using SQL) where a particular field in the record is left NULL (empty).
Attachments
Quality_Assurance.odb
multiple cloning plus subform grid filtered by two mainform fields
(14.63 KiB) Downloaded 2463 times
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
Post Reply