unexpected end function error in access

  • Thread starter Thread starter Stacie
  • Start date Start date
S

Stacie

I am trying to use a form to change the query that report is based on. I
followed the Make your queries interactive by using parameters instructions,
but the module code is returning an Unexpected End function. I copied the
following code from the instructions:
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

I know absolutely 0% about code so I'm not sure where to go. If I ignore
the Unexpected end error I can eventually get the selection form to pass
through the parameter I've selected and the report to refresh.

Thanks in advance
 
Back
Top