Database Form Events

The Events tab page, allows you to assign a macro to certain events which occur in a database form.

āĻāĻ‡ āĻ¨āĻŋāĻ°ā§āĻĻā§‡āĻļāĻžāĻŦāĻ˛ā§€āĻ¤ā§‡ āĻ¸āĻ¨ā§āĻ¨āĻŋāĻŦā§‡āĻļ āĻ•āĻ°āĻ¤ā§‡...

Open context menu of a selected form element - choose Form Properties - Events tab.

Open Form Design toolbar, click Form Properties icon - Events tab.


āĻāĻ•āĻŸāĻŋ āĻ‡āĻ­ā§‡āĻ¨ā§āĻŸāĻ•ā§‡ āĻāĻ•āĻŸāĻŋ āĻŽā§āĻ¯āĻžāĻ•ā§āĻ°ā§‹āĻ° āĻ¸āĻžāĻĨā§‡ āĻ˛āĻŋāĻ‚āĻ• āĻ•āĻ°āĻ¤ā§‡, āĻĒā§āĻ°āĻĨāĻŽā§‡ āĻāĻ•āĻŸāĻŋ āĻŽā§āĻ¯āĻžāĻ•ā§āĻ°ā§‹ āĻ˛āĻŋāĻ–ā§āĻ¨ āĻ¯āĻž āĻ¯āĻ–āĻ¨ āĻ‡āĻ­ā§‡āĻ¨ā§āĻŸāĻŸāĻŋ āĻ¸āĻ‚āĻ˜āĻ āĻŋāĻ¤ āĻšāĻŦā§‡ āĻ¤āĻ–āĻ¨ āĻ¸āĻŽā§āĻĒāĻžāĻĻāĻŋāĻ¤ āĻ•āĻ°āĻžāĻ° āĻœāĻ¨ā§āĻ¯ āĻ¸āĻŦ āĻ•āĻŽāĻžāĻ¨ā§āĻĄ āĻ§āĻžāĻ°āĻŖ āĻ•āĻ°ā§‡āĨ¤ āĻ¸āĻ‚āĻļā§āĻ˛āĻŋāĻˇā§āĻŸ āĻ‡āĻ­ā§‡āĻ¨ā§āĻŸā§‡āĻ° āĻĒāĻžāĻļā§‡ ... āĻŦā§‹āĻ¤āĻžāĻŽā§‡ āĻ•ā§āĻ˛āĻŋāĻ• āĻ•āĻ°ā§‡ āĻāĻ°āĻĒāĻ° āĻāĻ‡ āĻŽā§āĻ¯āĻžāĻ•ā§āĻ°ā§‹ āĻ¨āĻŋāĻœ āĻ¨āĻŋāĻœ āĻ‡āĻ­ā§‡āĻ¨ā§āĻŸā§‡ āĻŦāĻ°āĻžāĻĻā§āĻĻ āĻ•āĻ°ā§āĻ¨āĨ¤ āĻŽā§āĻ¯āĻžāĻ•ā§āĻ°ā§‹ āĻŦāĻ°āĻžāĻĻā§āĻĻ āĻ•āĻ°ā§āĻ¨ āĻĄāĻžā§ŸāĻžāĻ˛āĻ— āĻ–ā§āĻ˛āĻŦā§‡, āĻ¯ā§‡āĻ–āĻžāĻ¨ā§‡ āĻ†āĻĒāĻ¨āĻŋ āĻŽā§āĻ¯āĻžāĻ•ā§āĻ°ā§‹ āĻ¨āĻŋāĻ°ā§āĻŦāĻžāĻšāĻ¨ āĻ•āĻ°āĻ¤ā§‡ āĻĒāĻžāĻ°āĻŦā§‡āĻ¨āĨ¤

āĻ¨āĻŋāĻŽā§āĻ¨ā§‹āĻ•ā§āĻ¤ āĻ•āĻžāĻœ āĻ¸ā§āĻŦāĻ¤āĻ¨ā§āĻ¤ā§āĻ°āĻ­āĻžāĻŦā§‡ āĻ•āĻ¨āĻĢāĻŋāĻ—āĻžāĻ° āĻ•āĻ°āĻž āĻ¯ā§‡āĻ¤ā§‡ āĻĒāĻžāĻ°ā§‡, āĻāĻ° āĻŽāĻžāĻ¨ā§‡ āĻšāĻ˛ āĻāĻ•āĻŸāĻŋ āĻ•āĻžāĻœ āĻšāĻžāĻ˛āĻžāĻ¤ā§‡ āĻ†āĻĒāĻ¨āĻžāĻ° āĻ¨āĻŋāĻœāĻ¸ā§āĻŦ āĻāĻ•āĻŸāĻŋ āĻĄāĻžāĻ¯āĻŧāĻžāĻ˛āĻ— āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ° āĻ•āĻ°āĻ¤ā§‡ āĻĒāĻžāĻ°ā§‡āĻ¨āĨ¤

  1. āĻāĻ•āĻŸāĻŋ āĻ¤ā§āĻ°ā§āĻŸāĻŋ āĻŦāĻžāĻ°ā§āĻ¤āĻž āĻĒā§āĻ°āĻĻāĻ°ā§āĻļāĻ¨ āĻ•āĻ°āĻ›ā§‡,

  2. āĻŽā§āĻ›ā§‡ āĻĢā§‡āĻ˛āĻžāĻ° āĻāĻ•āĻŸāĻŋ āĻĒā§āĻ°āĻ•ā§āĻ°āĻŋāĻ¯āĻŧāĻž āĻ¨āĻŋāĻļā§āĻšāĻŋāĻ¤ āĻ•āĻ°āĻ›ā§‡ (āĻĄāĻžāĻŸāĻž āĻ°ā§‡āĻ•āĻ°ā§āĻĄā§‡āĻ° āĻœāĻ¨ā§āĻ¯),

  3. āĻœāĻŋāĻœā§āĻžāĻžāĻ¸āĻ• āĻĒā§āĻ¯āĻžāĻ°āĻžāĻŽāĻŋāĻŸāĻžāĻ°,

  4. āĻāĻ•āĻŸāĻŋ āĻĄāĻžāĻŸāĻž āĻ°ā§‡āĻ•āĻ°ā§āĻĄ āĻ¸āĻ‚āĻ°āĻ•ā§āĻˇāĻ¨ā§‡āĻ° āĻ¸āĻŽāĻ¯āĻŧ āĻ‡āĻ¨āĻĒā§āĻŸ āĻĒāĻ°ā§€āĻ•ā§āĻˇāĻž āĻ•āĻ°āĻ›ā§‡āĨ¤

āĻ‰āĻĻāĻžāĻšāĻ°āĻŖāĻ¸ā§āĻŦāĻ°ā§‚āĻĒ, āĻāĻ•āĻŸāĻŋ āĻ°ā§‡āĻ•āĻ°ā§āĻĄ āĻŽā§āĻ›ā§‡ āĻĢā§‡āĻ˛āĻžāĻ° āĻ¸āĻŽāĻ¯āĻŧ āĻ†āĻĒāĻ¨āĻŋ "āĻŽā§āĻ›ā§‡ āĻĢā§‡āĻ˛āĻž āĻ¨āĻŋāĻļā§āĻšāĻŋāĻ¤āĻ•āĻ°āĻŖ" āĻ…āĻ¨ā§āĻ°ā§‹āĻ§ āĻ¯ā§‡āĻŽāĻ¨, "āĻ¸āĻ¤ā§āĻ¯āĻŋāĻ‡ āĻ•āĻŋ āĻ—ā§āĻ°āĻžāĻšāĻ• xyz āĻŽā§āĻ›ā§‡ āĻĢā§‡āĻ˛āĻ¤ā§‡ āĻšāĻžāĻ¨?" āĻāĻŸāĻŋ āĻ‡āĻ¸ā§āĻ¯ā§ āĻ•āĻ°āĻ¤ā§‡ āĻĒāĻžāĻ°ā§‡āĻ¨āĨ¤

note

The events that are shown in the Events dialog cannot be edited directly. You can remove an event from the list by pressing the Del key.


āĻ¨āĻŋāĻŽā§āĻ¨ā§‹āĻ•ā§āĻ¤āĻŸāĻŋ āĻāĻ•āĻŸāĻŋ āĻ—āĻ āĻ¨ā§‡āĻ° āĻ¸āĻŦ āĻ…āĻ¨ā§āĻˇā§āĻ āĻžāĻ¨ āĻ¤āĻžāĻ˛āĻŋāĻ•āĻžāĻŦāĻĻā§āĻ§ āĻāĻŦāĻ‚ āĻŦāĻ°ā§āĻŖāĻ¨āĻž āĻ•āĻ°āĻ¤ā§‡ āĻĒāĻžāĻ°ā§‡ āĻ¯āĻž āĻāĻ•āĻŸāĻŋ āĻŽā§āĻ¯āĻžāĻ•ā§āĻ°ā§‹āĻ¤ā§‡ āĻ¯ā§āĻ•ā§āĻ¤ āĻĨāĻžāĻ•āĻ¤ā§‡ āĻĒāĻžāĻ°ā§‡:

āĻ†āĻ¨āĻ˛ā§‹āĻĄ āĻ•āĻ°āĻžāĻ° āĻĒā§‚āĻ°ā§āĻŦā§‡

The Before unloading event occurs before the form is unloaded; that is, separated from its data source.

āĻ¤ā§āĻ°ā§āĻŸāĻŋ āĻ˜āĻŸā§‡āĻ›ā§‡

The Error occurred event is activated if an error occurs when accessing the data source. This applies to forms, list boxes and combo boxes.

āĻĒā§āĻ¨āĻ°āĻžāĻ¯āĻŧ āĻ˛ā§‹āĻĄ āĻ•āĻ°āĻžāĻ° āĻ†āĻ—ā§‡

The Before reloading event occurs before the form is reloaded. The data content has not yet been refreshed.

āĻĒā§āĻ¯āĻžāĻ°āĻžāĻŽāĻŋāĻŸāĻžāĻ° āĻĒā§‚āĻ°āĻŖ āĻ•āĻ°ā§āĻ¨

The Fill parameters event occurs when the form to be loaded has parameters that must be filled out. For example, the data source of the form can be the following SQL command:

SELECT * FROM address WHERE name=:name

Here :name is a parameter that must be filled out when loading. The parameter is automatically filled out from the parent form if possible. If the parameter cannot be filled out, this event is called and a linked macro can fill out the parameter. Return True when the execution of the parametrized statement should continue, False otherwise.

āĻĒā§āĻ°āĻĻāĻžāĻ¨ā§‡āĻ° āĻ†āĻ—ā§‡

The Before submitting event occurs before the form data is sent. Returning True approves the submission, False stops it.

āĻŽā§āĻ›ā§‡ āĻĢā§‡āĻ˛āĻž āĻ¨āĻŋāĻļā§āĻšāĻŋāĻ¤āĻ•āĻ°āĻŖ

The Confirm deletion event occurs as soon as data has been deleted from the form. Return True to allow row deletion, False otherwise. For example, the linked macro can request confirmation in a dialog.

āĻ¯āĻ–āĻ¨ āĻ†āĻ¨āĻ˛ā§‹āĻĄ āĻ•āĻ°āĻž āĻšāĻšā§āĻ›ā§‡

The When unloading event occurs directly after the form has been unloaded; that is, separated from its data source.

āĻ¯āĻ–āĻ¨ āĻ˛ā§‹āĻĄ āĻ•āĻ°āĻž āĻšāĻšā§āĻ›ā§‡

The When loading event occurs directly after the form has been loaded.

āĻ¯āĻ–āĻ¨ āĻ˛ā§‹āĻĄ āĻ•āĻ°āĻž āĻšāĻšā§āĻ›ā§‡

The When reloading event occurs directly after the form has been reloaded. The data content has already been refreshed.

āĻ°ā§‡āĻ•āĻ°ā§āĻĄ āĻ•āĻžāĻœāĻ° āĻ†āĻ—ā§‡

The Before record action event occurs before the current record or record set are changed. Return True when changing is allowed, otherwise False. For example, the linked macro can request confirmation in a dialog.

āĻ°ā§‡āĻ•āĻ°ā§āĻĄ āĻ•āĻžāĻœāĻ° āĻĒāĻ°ā§‡

The After record action event occurs directly after the current record has been changed.

āĻ°ā§‡āĻ•āĻ°ā§āĻĄ āĻĒāĻ°āĻŋāĻŦāĻ°ā§āĻ¤āĻ¨ā§‡āĻ° āĻ†āĻ—ā§‡

The Before record change event occurs before the current record pointer - SQL cursor - is changed. Return True when moving is allowed, otherwise False.

āĻ°ā§‡āĻ•āĻ°ā§āĻĄ āĻĒāĻ°āĻŋāĻŦāĻ°ā§āĻ¤āĻ¨ā§‡āĻ° āĻĒāĻ°ā§‡

The After record change event occurs directly after the current record pointer has been changed.

āĻšāĻžāĻ˛āĻ¨āĻžāĻ—āĻžāĻĻ āĻ•āĻ°āĻžāĻ° āĻ†āĻ—ā§‡

The Before update event occurs before the control content changed by the user is written into the data source. The linked macro can, for example, prevent this action by returning FALSE.

āĻšāĻžāĻ˛āĻ¨āĻžāĻ—āĻžāĻĻ āĻ•āĻ°āĻžāĻ° āĻĒāĻ°ā§‡

The After update event occurs after the control content changed by the user has been written into the data source.

āĻĒā§āĻ¨āĻ°āĻžāĻ¯āĻŧ āĻ¸ā§āĻĨāĻžāĻĒāĻ¨ āĻ•āĻ°āĻžāĻ¤ā§‡ āĻĒā§āĻ°āĻžāĻ§āĻžāĻ¨ā§āĻ¯

The Prior to reset event occurs before a form is reset. Returning True approves the reset, returning False cancels the operation.

āĻ—āĻ āĻ¨āĻŸāĻŋ āĻĒā§āĻ¨āĻ°āĻžāĻ¯āĻŧ āĻ¨āĻŋāĻ¯ā§āĻ•ā§āĻ¤ āĻšāĻ¯āĻŧ āĻ¯āĻĻāĻŋ āĻ¨āĻŋāĻŽā§āĻ¨ā§‹āĻ•ā§āĻ¤ āĻ¯ā§‡āĻ•ā§‹āĻ¨ā§‹ āĻāĻ•āĻŸāĻŋ āĻļāĻ°ā§āĻ¤ āĻĒā§‚āĻ°āĻŖ āĻ•āĻ°āĻž āĻšāĻ¯āĻŧ:

  1. āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ°āĻ•āĻžāĻ°ā§€ āĻāĻ•āĻŸāĻŋ HTML āĻŦā§‹āĻ¤āĻžāĻŽ āĻšāĻžāĻĒā§‡ āĻ¯āĻž āĻĒā§āĻ¨āĻ°āĻžāĻ¯āĻŧ āĻ¨āĻŋāĻ¯ā§āĻ•ā§āĻ¤āĻ•āĻ°āĻŖ āĻŦā§‹āĻ¤āĻžāĻŽ āĻšāĻŋāĻ¸ā§‡āĻŦā§‡ āĻŦā§āĻ¯āĻžāĻ–ā§āĻ¯āĻžāĻ•ā§ƒāĻ¤āĨ¤

  2. āĻāĻ•āĻŸāĻŋ āĻ¨āĻ¤ā§āĻ¨ āĻāĻŦāĻ‚ āĻĢāĻžāĻāĻ•āĻž āĻ°ā§‡āĻ•āĻ°ā§āĻĄ āĻāĻ•āĻŸāĻŋ āĻĢāĻ°ā§āĻŽā§‡ āĻ¤ā§ˆāĻ°āĻŋ āĻ•āĻ°āĻž āĻšāĻŦā§‡ āĻ¯āĻž āĻāĻ•āĻŸāĻŋ āĻĄāĻžāĻŸāĻž āĻ‰ā§ŽāĻ¸ā§‡āĻ° āĻ¸āĻžāĻĨā§‡ āĻ¸āĻ‚āĻ¯ā§āĻ•ā§āĻ¤āĨ¤ āĻ‰āĻĻāĻžāĻšāĻ°āĻŖāĻ¸ā§āĻŦāĻ°ā§‚āĻĒ, āĻļā§‡āĻˇ āĻ°ā§‡āĻ•āĻ°ā§āĻĄā§‡, āĻĒāĻ°āĻŦāĻ°ā§āĻ¤ā§€ āĻ°ā§‡āĻ•āĻ°ā§āĻĄ āĻŦā§‹āĻ¤āĻžāĻŽ āĻ¸āĻŽā§āĻ­āĻŦāĻ¤ āĻšāĻžāĻĒāĻž āĻšāĻŦā§‡āĨ¤

āĻĒā§āĻ¨āĻ°āĻžāĻ¯āĻŧ āĻ¸ā§āĻĨāĻžāĻĒāĻ¨ āĻ•āĻ°āĻžāĻ° āĻĒāĻ°

The After resetting event occurs after a form has been reset.

Vetoable events

tip

Macros can interrupt event execution when they return a boolean value: True allows the execution of the event to continue and False stops the event execution.


The following events are interruptable by returning False:

Please support us!