O
Owl
I created a DialogBox form to collect parameters for a report. The macro has
3 little yellow triangles denoting a problem on the last lines 3, 4 and 5.
Please could somebody tell me how to fix this.
Query: Q04_ForReportWithDialogBox
Report: R04_WithDialogBox
Form: FD_ParameterCollector
Module: Module1
Macro: M01_ParameterCollector
MACRO
FIRST LINE
Macro name: Open Dialog
Condition: (Blank)
Action: OpenForm
Arguments: FD_ParameterCollector, Form
SECOND LINE
Macro name: (Blank)
Condition: NotIsLoaded(“FD_ParameterCollectorâ€)
Action: CancelEvent
Arguments: (Blank)
THIRD LINE
Macro name: Close Dialog
Condition: (Blank)
Action: Close
Arguments: FD_ParameterCollector, Form
FOURTH LINE
Macro name: OK
Condition: (Blank)
Action: SetValue
Arguments: [Visible], No
FIFTH LINE
Macro name: Cancel
Condition:
Action: Close
Arguments: FD_ParameterCollector, Form
The module is as follows:
Function IsLoaded(ByVal strFormName As String) As Boolean
Dim oAccessObject As AccessObject
Set oAccessObject = CurrentProject.AllForms(strFormName)
If oAccessObject.IsLoaded Then
If oAccessObject.CurrentView <> acCurViewDesign Then
IsLoaded = True
End If
End If
End Function
Thanks for any help.
3 little yellow triangles denoting a problem on the last lines 3, 4 and 5.
Please could somebody tell me how to fix this.
Query: Q04_ForReportWithDialogBox
Report: R04_WithDialogBox
Form: FD_ParameterCollector
Module: Module1
Macro: M01_ParameterCollector
MACRO
FIRST LINE
Macro name: Open Dialog
Condition: (Blank)
Action: OpenForm
Arguments: FD_ParameterCollector, Form
SECOND LINE
Macro name: (Blank)
Condition: NotIsLoaded(“FD_ParameterCollectorâ€)
Action: CancelEvent
Arguments: (Blank)
THIRD LINE
Macro name: Close Dialog
Condition: (Blank)
Action: Close
Arguments: FD_ParameterCollector, Form
FOURTH LINE
Macro name: OK
Condition: (Blank)
Action: SetValue
Arguments: [Visible], No
FIFTH LINE
Macro name: Cancel
Condition:
Action: Close
Arguments: FD_ParameterCollector, Form
The module is as follows:
Function IsLoaded(ByVal strFormName As String) As Boolean
Dim oAccessObject As AccessObject
Set oAccessObject = CurrentProject.AllForms(strFormName)
If oAccessObject.IsLoaded Then
If oAccessObject.CurrentView <> acCurViewDesign Then
IsLoaded = True
End If
End If
End Function
Thanks for any help.