R
rjohannes
I have been referencing a help topic of the name 'make a query ask for input'
but I am having a hard time with the VBA code. (I admit I don't know much at
all about the code) The help topic had me copy and paste a section of code
into a module, the code looks like this:
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
When I run the macro this error message pops up:
Compile error:
Expected End Function
With the last 'End If' highlighted, when I click okay it highlights in
yellow the very first line starting the function.
Am I doing something wrong?
but I am having a hard time with the VBA code. (I admit I don't know much at
all about the code) The help topic had me copy and paste a section of code
into a module, the code looks like this:
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
When I run the macro this error message pops up:
Compile error:
Expected End Function
With the last 'End If' highlighted, when I click okay it highlights in
yellow the very first line starting the function.
Am I doing something wrong?