Thursday, March 26, 2009

New Sample: Form_MoveTabControl

Form_MoveTabControl

by A.D. Tejpal

Sample Db - Explanatory Notes

This sample db demonstrates movement of tab control to any desired location, along with all its controls located on various pages.

Conventional approach to moving a control does not suit a tab control, as the controls contained in it stay put at their current locations. As a result, one can land up with a badly deformed tab control, in an effort not to let go of any control.

A workaround for ensuring correct movement of tab control, along with all its controls, without resorting to custom built collection or array, is demonstrated in this sample db.

Version: Access 2000 File Format

You can find the sample here: http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=448

.

Thursday, March 19, 2009

New Sample: Reports_AddIn_2

Reports_AddIn_2

by A.D. Tejpal

Sample Add-In - Explanatory Notes

General: This Add-In is meant to utilize a set of common reports belonging to the Add-In, in various db's. Queries in host db are used as record source for such reports. On activation of the Add-In, names of reports belonging to the Add-In are shown in a list box at left, while names of queries available in host db are displayed in list box at right.

For a given report selected in left list box, the user can select an appropriate query in right list box. The selected report will open, using selected query as its record source.

Version: Access 2000 File format
Reference Required: DAO 3.6

You can find the sample here: http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=447

.

Tuesday, March 17, 2009

New Sample: Form_UnBound_UnDoReDo

Form_UnBound_UnDoReDo

by A.D. Tejpal

Sample Db - Explanatory Notes

General:
This sample db demonstrates Undo / Redo features while entering / editing data through an unbound form. Use of collections for storing control and field values respectively, facilitates the process.

Adding a new record:
Clicking the Add command button presents a simulated new record in distinct back color (indicative of new record). As soon as it is made dirty, Save and Undo command buttons become enabled. Clicking Save adds the record to source table and back color changes confirming the process. If, instead of Save, Undo is clicked, the existing entries get ignored, and fresh blank new record is presented.

Editing an existing record:
Based upon selection in combo box, the controls get populated with the contents of desired record, with a back color distinct from that for new record. As soon as the record is made dirty (by making change in any of the controls), Save and Undo buttons get enabled.
Clicking the Undo button restores the original values and simultaneously, Redo button gets enabled (accompanied by disabling of Undo button). Clicking the Redo button restores the values back to recently edited ones. Simultaneously, Undo button gets enabled (accompanied by disabling of Redo button). The user can shuttle between the Undo & Redo buttons as often as desired. Different back colors confirm Undo / Redo actions.

Clicking Save button saves the record as edited.

Deleting records:
Clicking the Delete button deletes the selected record. At the same time, autonumber for source table gets reset suitably so that next one will get generated in sequence, without leaving any holes.

Version: Access 2000 File Format

You can find the sample here: http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=446

.