'---------------------------------------------------------------------------------------
' Procedure : getFormFilters
' Author : Jack
' Date : 05-10-2011
' Purpose : To return the Filter expression for a supplied Form name
'---------------------------------------------------------------------------------------
' Last Modified:
'
' Inputs: Form name
' Dependency: N/A
'--------------------------------------------------------------------------
'
Public Function getFormFilters(FrmName As String) As String
On Error GoTo getFormFilters_Error
If Not CurrentProject.AllForms(FrmName).IsLoaded Then
DoCmd.OpenForm FrmName, acNormal, , , , acHidden
getFormFilters = Forms(FrmName).Filter
DoCmd.Close acForm, FrmName
Else
getFormFilters = Forms(FrmName).Filter
End If
On Error GoTo 0
Exit Function
getFormFilters_Error:
MsgBox "Error " & Err.number & " (" & Err.Description & ") in procedure getFormFilters of Module AWF_Related"
End Function