Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
Dim pos As Long
Dim sSql As String
Dim qry As DAO.QueryDef
sSql = Me.RecordSource
On Error Resume Next
Set qry = CurrentDb.QueryDefs(Me.RecordSource)
On Error GoTo 0
If Not (qry Is Nothing) Then
sSql = qry.SQL
End If
pos = InStr(sSql, "WHERE")
If pos > 0 Then
txtCr.Value = Mid(sSql, pos + 6)
Else
txtCr.Value = ""
End If
End Sub