I have a combo with a list of selections and one of them is to show all records but it does not show all of the record. Here is the code.
Select Case Me.Combo63
Case "All"
DoCmd.ShowAllRecords
Me.Requery
End Select
Me.FilterOn = True
I have a combo with a list of selections and one of them is to show all records but it does not show all of the record. Here is the code.
Select Case Me.Combo63
Case "All"
DoCmd.ShowAllRecords
Me.Requery
End Select
Me.FilterOn = True
Last edited by burrina; 01-05-2013 at 02:59 PM. Reason: forgot combo name.
Is that all the code? The last line will apply a filter.
Select Case Me.Combo63
Case "Today"
Me.Filter = "[nextschddte]=Date()"
Case "This Week"
Me.Filter = "[nextschddte] BETWEEN Date()-7 AND Date()"
Case "Last Week"
Me.Filter = "[nextschddte] BETWEEN Date()-14 AND Date()-7"
Case "Last Month"
Me.Filter = "Format([nextschddte],'mmyyyy') = Format(DateAdd('m',-1,Date()),'mmyyyy')"
Case "Next Month"
Me.Filter = "Format([nextschddte],'mmyyyy') = Format(DateAdd('m',+1,Date()),'mmyyyy')"
Case "All"
DoCmd.ShowAllRecords
Me.Requery
End Select
Me.FilterOn = True
End Sub
I have never used ShowAllRecords and not finding much about it.
Maybe this will work:
DoCmd.RunCommand acCmdRemoveAllFilters
or
DoCmd.RunCommand acCmdRemoveFilterSort
I just tested all three and they all worked.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Yep, that worked,,, Thanks Again.