Datasheet

RAIS 3.0 Programmer’s Guide – Part I : Advanced Customization
25
The red box in the picture above highlights the field that will be shown in the main screen if
the corresponding query will be added to the table Propogator Menu Selector as described
before.
2.7 Creating Custom Functions and Modules
RAIS 3.0 allows for adding functions und procedures, according Microsoft Access Visual
Basic syntax and requirements. RAIS 3.0 does not impose any limitations or special
conventions to be respected; functions, procedures, class modules as well as simple modules
may be defined just in the same way as for any other Microsoft Access Application.
The best approach for creating new custom modules is:
Create and design the new custom module in an unlocked front-end
Test, debug and validate the new custom module
Copy the final new custom module in the RAIS 3.0 Creator (hereafter referred to as
[source module])
Modify the RAIS 3.0 Creator for the new custom module to be created upon the next creation
run:
Locate the function [Public Sub ModuleCreate] in the module [RAIS Module Creator
Functions]
Include a line DoCmd.CopyObject d, "destination module", acModule, "source
module"
Custom functions (and procedures) may be declared in custom modules, just as any function
is declared in Microsoft Access. We recommend that all custom functions are declared only
in custom modules to avoid for loss or overwrite.
RAIS 3.0 contains a few functions that may be modified by RAIS Administrator and
Developers: Regulatory Authority Number (RAN) functions. RAN functions are special in
that way that they are automatically invoke upon creation of new records for facilities,
departments, sources, inspections, incidents, persons and authorizations. This is done by
propagating default values by means of the table [Propagator – Preselection] (see section 2.4)
2.7.1 Examples
2.7.1.1 Regulatory Authority Numbers
Let us redefine the RAN function for new facilities. Have a look at how the default RAN for
facilities (and other RAN functions) is defined. Open the RAIS 3.0 front-end in design mode,
open the module [RAIS Regulatory Authority Number Functions] and locate the function
[BuildFacilityRAN()]
Public Function BuildFacilityRAN()
BuildFacilityRAN = ""