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
 
Looks like you're missing the

End Function

at the end of that code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top