|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the modForms module
|
|
ComboBoxOpen
|
Procedure
|
Opens the passed combo box control
|
|
ComboSetFirst
|
Procedure
|
Set the first value in a combo box as the selected value
|
|
CurrentFormView
|
Procedure
|
Retrieve the current view of the specified form, if it's open
|
|
DeSelectControl
|
Procedure
|
De-highlights the text in the specified control by placing the cursor at the beginning of the control.
This is useful to handle the situations where a user tabs into a control and Access highlights the entire control. Call this function after arriving at the control and it will de-highlight the control.
Note that this function works only with textbox and combo box controls.
|
|
EnableDisableControls
|
Procedure
|
Enables or disables all controls in the specified section of the specified form. If disabling, make sure the control doesn't have focus.
Controls that have focus cannot be disabled. Therefore, if you call this procedure for a section that contains the control that has focus, all controls except that control will be disabled.
|
|
Form_SetCommandButtons
|
Procedure
|
Set command button properties on the form, including the use of the hyperlink hand while hovering
|
|
Form_SetFonts
|
Procedure
|
Set the font name and size for label, text box, and tab controls
|
|
Form_SetSectionColors
|
Procedure
|
Set the form's section colors to one consistent color (defaults to the Windows System color)
|
|
Form_SetSectionColorsIndividually
|
Procedure
|
Set the each of the form's section colors. Use -2147483643 if you want the System Windows color
|
|
FormAddRecord
|
Procedure
|
Adds a new record in the specified form.
Many editing forms in Access applications have the need for the user to easily add records.
You can accomplish this by using the navigation buttons of the form, or by using the keyboard to move to the last record and opening a new record.
However, your application may need to add additional logic to the operation of adding a new record.
Use this function to add a new record, handling your special needs before or after calling it.
|
|
FormClose
|
Procedure
|
Closes the named form without errors.
This function is useful when closing a form and that form may not be open. It first checks to see if the object is open, and if it is, closes it.
|
|
FormCloseAll
|
Procedure
|
Closes all open forms that can be closed
|
|
FormControlPropertiesChange
|
Procedure
|
Opens a form in design view, sets the specified property to the specified value on all controls, and optionally saves the form
You can use this function to make mass changes to a form's properties. The fSave parameter indicates whether or not the changes should be changed.
|
|
FormControlsToArray
|
Procedure
|
Populates the passed array with control names of a Form. The passed array must be 0-based.
The procedure will expand the array as needed, so you do not need to pre-allocate array storage before calling the procedure.
If the form specified is not open, the procedure opens it in design view, fills the array and then closes the form.
If the form specified is already open, this procedure does not re-open or close the form.
|
|
FormControlsToString
|
Procedure
|
Populates the passed string with control names of a Form.
Use the chrDelimit parameter to specify the character or characters to use as the delimiter between control names.
The procedure places the resulting string in the strIn parameter.
|
|
FormDeleteRecord
|
Procedure
|
Deletes the current record from the specified form
|
|
FormMoveFirst
|
Procedure
|
Moves to the first record of a form.
This is useful when you are implementing your own navigation buttons, and want to duplicate the behavior of the built-in Access navigation buttons.
|
|
FormMoveLast
|
Procedure
|
Moves to the last record of a form
This is useful when you are implementing your own navigation buttons, and want to duplicate the behavior of the built-in Access navigation buttons.
|
|
FormMoveNext
|
Procedure
|
Moves to the next record of a form
This is useful when you are implementing your own navigation buttons, and want to duplicate the behavior of the built-in Access navigation buttons.
|
|
FormMovePrevious
|
Procedure
|
Moves to the previous record of a form
This is useful when you are implementing your own navigation buttons, and want to duplicate the behavior of the built-in Access navigation buttons.
|
|
FormMoveSizeInches
|
Procedure
|
Moves and/or resizes the named form in units of inches.
The form named by the strForm parameter must be open for this procedure to work.
To leave a particular sizing/position value unchanged, do not specify a value when calling the procedure.
For example, to resize a form, leaving its position intact, specify values for the varWidth and varHeight parameters, and zero-length strings for the varTop and varLeft parameters.
|
|
FormMoveSizeTwips
|
Procedure
|
Moves and/or resizes the named form in units of Twips (1 twip = 1/1400 inch).
This procedure gives a greater amount of accuracy in moving and sizing forms than the related FormMoveSizeInches_TSB() procedure.
The form named by the strForm parameter must be open for this procedure to work.
To leave a particular sizing/position value unchanged, do not specify a value when calling the procedure.
For example, to resize a form, leaving its position intact, specify values for the varWidth and varHeight parameters, and zero-length strings for the varTop and varLeft parameters.
|
|
FormNamesToArray
|
Procedure
|
Loads an array with names of all all forms in the current database
|
|
FormNamesToString
|
Procedure
|
Populates a string with names of all forms in the current database
|
|
FormOnNewRecord
|
Procedure
|
Determines if the specified form is on a new record by checking the value of the NewRecord property.
|
|
FormOpen
|
Procedure
|
Opens the named form with option to use dialog mode and trap for any errors. If the form is open, just select it
|
|
FormOpenDesign
|
Procedure
|
Opens a form in design mode. If it's already open, change the current view to design view
|
|
FormOpenDesignAll
|
Procedure
|
Opens all the forms in design view and if visible, minimizes them. Skips forms that are already open
|
|
FormOpenReplace
|
Procedure
|
Opens a form with all the options and trap for any errors.
If the form is open, close it and open it again (useful if an argument is passed and/or running Open and Load events)
|
|
FormPropertyChange
|
Procedure
|
Changes the value of the named property on a Form
|
|
FormSaveRecord
|
Procedure
|
Saves the current record on the specified form.
This is useful if you want to add a [Save] button to your form, and call this procedure from that button to save the current record.
|
|
FormsOpen
|
Procedure
|
Determines if any forms are open.
This is useful when your application must perform an operation (such as closing) that requires all forms and report to be closed.
See the CloseObjectsOfType() and CloseAllOpenObjects() functions for ways to close open objects.
|
|
FormUndoRecord
|
Procedure
|
Undo the changes to the current record on the specified form.
This is useful if you want to put an 'Undo' command button on your form to undo edits to the current record or field.
|
|
GetActiveForm
|
Procedure
|
Returns the name of the currently active form
|
|
GetControlType
|
Procedure
|
Returns the control type (English name) of a form or report control
|
|
IsFormOpen
|
Procedure
|
Determines if a form is open. Typically, before opening a form, you check to see if that form is open.
|
|
IsFormOpenInDatasheetView
|
Procedure
|
Determines if a form is open in datasheet view
|
|
IsFormOpenInDesignView
|
Procedure
|
Determines if a form is open in design view.
Access supports certain operations on forms only when they are open in design view. Use this procedure to verify how a form is opened before attempting such operations.
|
|
IsFormOpenInFormView
|
Procedure
|
Determines if a form is open in form (normal) view
|
|
IsFormOpenInLayoutView
|
Procedure
|
Determines if a form is open in layout view
|
|
IsFormOpenInMode
|
Procedure
|
Determines if a form is open in a particular view
|
|
IsSubForm
|
Procedure
|
Determines if the passed form is open as a form or a subform.
This can be useful when your database contains a form that is used in regular view mode as well as a subform.
If your application has special logic that is affected by whether or not the form is opened as a subform, use this procedure to detect this case.
|
|
ListFillForms
|
Procedure
|
Provides a list fill function for a list/combo box for a list of forms.
Use the name of this function as the "RowSourceType" property of a listbox or combo box. Do NOT use an "=" sign or parentheses
|
|
ListFillMacros
|
Procedure
|
Provides a list fill function for a list/combo box for a list of macros
Use the name of this function as the "RowSourceType" property of a listbox or combo box. Do NOT use an "=" sign or parentheses
|
|
ListFillModules
|
Procedure
|
Provides a list fill function for a list/combo box for a list of modules
Use the name of this function as the "RowSourceType" property of a listbox or combo box. Do NOT use an "=" sign or parentheses
|
|
ListFillReports
|
Procedure
|
Provides a list fill function for a list/combo box for a list of reports
Use the name of this function as the "RowSourceType" property of a listbox or combo box. Do NOT use an "=" sign or parentheses
|
|
ObjectNamesToArray
|
Procedure
|
Loads an array with names of all of an object type
|
|
SelectControl
|
Procedure
|
Selects/de-selects the contents of the specified control.
This can be useful when you want your code to select all the text in a particular control.
By default Access highlights an entire control's contents when you move into that control.
You can use this function to remove the highlight by setting the fNone parameter to true.
|
|
WaitUntilFormClose
|
Procedure
|
Waits for the named form to close, using the Sleep command rather than DoEvents (which eats up CPU processing resources).
This is useful if you want to suspend the execution of code until the user closes a form, but the form cannot be opened modally.
|