Hi I have a form to display records but I cant get the filters I have set up to work consistently and revert when reset.
The Form has a combo dropdown to select a type of record and a tickbox to select All if unchecked and only records marked as Active if checked they are not connected so any combination should be possible but they dont always refresh sometimes needing 2 clicks sometimes close and reopen the form. I am sure its something simple but the last few hours google hasnt helped.
the SQL in the underlying query is
the VBA used for the tickbox filter is
The Form has a combo dropdown to select a type of record and a tickbox to select All if unchecked and only records marked as Active if checked they are not connected so any combination should be possible but they dont always refresh sometimes needing 2 clicks sometimes close and reopen the form. I am sure its something simple but the last few hours google hasnt helped.
the SQL in the underlying query is
Code:
SELECT RegQuery.DocRef, DocVer.VerDate, DocVer.DocVerNo, DocMain.DocTitle, DocMain.DocDept, DocMain.DocType, DocMain.DocStatus
FROM DocMain RIGHT JOIN (RegQuery INNER JOIN DocVer ON (RegQuery.MaxOfDocVerNo = DocVer.DocVerNo) AND (RegQuery.DocRef = DocVer.DocRef)) ON DocMain.DocRef = DocVer.DocRef
WHERE ((([Forms]![Register]![CboType]) Is Null Or ([Forms]![Register]![CboType])=[DocType]))
ORDER BY RegQuery.DocRef;
the VBA used for the tickbox filter is
Code:
Private Sub CboType_Change()
Forms!Register.Requery
'Me.CboType = Null
End Sub
Private Sub ChkActive_AfterUpdate()
If ChkActive = True Then
DoCmd.ApplyFilter , "[DocStatus] = True"
Else
Me.FilterOn = False
End If
Forms!Register.Requery
End Sub
Private Sub ChkActive_Click()
Forms!Register.Requery
End Sub
Private Sub Command30_Click()
Me.CboType = Null
Me.ChkActive = Null
Forms!Register.Requery
End Sub