Dynamic Shortcut Menus

560 Downloads

This is a demo of how to create shortcut menu bars from table data.

Unlike the shortcuts on normal shortcut menu bars all the shortcuts in the demo are driven by VBA. This allows altering the normal behaviour of the shortcut or creating your own.

In this demo the shortcut menu bar is generated in the On Current even of a continious sub-form. The shortcut menu bar could also be generated in the On Open event but the On Current event would allow modifing the shortcuts on the fly depending on current data in the record.

The shortcut data in the table can be flagged as required or not on a Form by Form basis.

Some of the examples given are: -
Spell check.
Sort ascending.
Sort descending.
Filter by selection.
Remove filter.
Call a public function with control data.
Call a public function with the primary key.
Export the current Sort/Filter selection to Excel, Word, etc.
Call public functions.
Execute hyperlinks.

Basically what this means is that if we can write code to do something then that code can be called from a shortcut.

The attached demo, in Access 2003, has been tested with many regional settings and requires no references.

Category: Example Forms
File Size: 71.17 KB
File Type: application/zip
Hits: 24639 Hits
Download: 560 times
Created Date: 05-15-2017
Last Updated Date: 05-15-2017

Related documents

Peter Hibbs' Flex Grid Demo
Peter Hibbs' Flex Grid Demo

This demonstration database shows various methods of using the Flex Grid
ActiveX control in an Access 2000 (or later) database. Flex Grid controls can be
used to show data from a table or query on a form in a format which is not possible
using standard Access controls.

Centering a form in the Access window
Centering a form in the Access window

Author:  Peter Schroeder

This  example (A2K format) contains a module that can be used to reliably center (both horizontally and vertically) a form in the Access Window. There is a very simple demo of how it works, as well. The module itself uses Windows API calls to determine the Access application client area and the dimensions of the form in question, and calculates what the TOP and LEFT settings of the form should be to be centered in the Access window.

 

To use, simply insert the entire modCenterForm into your own database. It is called as follows:


Code:


 

Call gfncCenterForm([form])

Fancy Sort in Continuous Forms
Fancy Sort in Continuous Forms

Here's an interesting method of sorting columns in a continuous form. In this case, a subform is used, but the same can be applied to a main form. All the code is behind the form, so there is no need for a regular module.

In the attached Access 97 demo, all this code is in the "sfrmVST" form (a subform).

The first thing to do is to set up each column's title label with a consistant naming convention; "lblxxxxx". Then, each label has a "Tag" property value that contains the name of the 'field' it represents.

There is also another label that is set far to the left of the form. This particular label is special in a couple of ways. First, it's font is set to Marlett and it's visible property is set to "No". The caption of this label is the number "5". It is also important that the label be named: "lblSortIndicator". The "OnClick" event of this label should contain the following code:


Me.lblSortIndicator.Visible = False
Me.OrderBy = ""

Document Text stored in tables
Document Text stored in tables

This example shows how to use tables to store the all the parts of a document.  An  exmaple web be for  creating contracts.

This example also shows how to use cascading sub forms. This is where two sub forms on hte parent for are linked. The first sub form shows records related to the Parent form's current record.. The second sub fom (on the parent form) shows related records to the current record in the other sub form.

Orders.mdb and Solutions.mdb
Orders.mdb and Solutions.mdb

The Orders and Developer Solutions sample databases that are included with earlier versions of Microsoft Access were not included with Access 2000.

The Orders and Developer Solutions sample databases for Access 2000 are now available

Orders   The Orders sample application is a sample order entry and invoicing system. Its features include the ShowEvents form, which helps you see the order in which events occur when you are working with forms and controls, and custom data filtering capabilities that you can use in addition to the filtering functionality provided by Access. The initial chapters of Microsoft Access 2000: Building Applications with Forms and Reports explain how to build the features shown in the sample application.

Developer Solutions   The Developer Solutions sample application contains examples of the forms, reports, and interface elements you most commonly use to create applications. From changing a form’s toolbars in response to events to creating a crosstab report with dynamic column headings, the objects in Developer Solutions illustrate the main areas of application design. This sample application also includes procedures that you might find useful as you develop your own applications—for example, you will find procedures that link tables at startup, close all objects when the user exits the application, and capitalize the first letter of every word in a field.

For more details see: Microsoft Access 2000: Building Applications with Forms and Reports

 

Spreadsheet-like Entry Data Form Demo
Spreadsheet-like Entry Data Form Demo
**** Disclaimer ***

If you are new to database modeling or looking for a way to make Access act like Excel, this demo may not be for you. This demo represents a special case of data entry and is in no way a substitution for proper normalization, single form presentation among other things and in all probability will have limited use, if any, for several business models out there.

This database demonstrate how to create a entry form that provides a spreadsheet-like view and live form that can be updated real-time using a bound datasheet form. While this form uses checkboxes, there is no reason why it can't use textboxes or comboboxes, as long as this is a matrix of where each combination of a given row and a given column can only have exactly one value. In other words, no aggregating are actually done. This is useful for users who want to have a 'bird's eye view' and editing multiple records in a junction table representing a many-many relationship in a single form.

The demo is a class attendance record where it is assumed that new classes are created, and attendees registered for a given class are done in a separate forms (not included). The default form will display a selected class with attendees within the registration roster and dates specified for class meetings. All checkboxes are updateable, and new columns can be added for additional sessions. Attendee names are locked and the form will not allow additions, as per the assumptions.