Im working at a non-profit clinic for the summer and have been tasked with updating their DB. Years ago i worked with access and have been able to build the tables, queries, forms, switchboards etc... but have been running into problems adding bells and whistles that require VBA.
I followed the guide posted on the link below to build a form that gathers a start and end date and then passes them to a query I built.
http://office.microsoft.com/en-ca/access-help/use-parameters-in-queries-and-reports-HA010096314.aspx
I receive the following VBA error when running a module that checks to see if I have the query open already....
"Compile Error: Expected End Function"
The code i used is:
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
Any help will be appreciated. I dont really understand VBA so Im not sure if I have provided all the info you'd need to help. Just let me know and I will provide it.
Thanks,
I followed the guide posted on the link below to build a form that gathers a start and end date and then passes them to a query I built.
http://office.microsoft.com/en-ca/access-help/use-parameters-in-queries-and-reports-HA010096314.aspx
I receive the following VBA error when running a module that checks to see if I have the query open already....
"Compile Error: Expected End Function"
The code i used is:
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
Any help will be appreciated. I dont really understand VBA so Im not sure if I have provided all the info you'd need to help. Just let me know and I will provide it.
Thanks,