Thread: Show All Records
08-02-12, 19:57 #1Registered User
- Join Date
- Nov 2011
Unanswered: Show All Records
I have a table with a filed named Status which the default is set to Active, it is a combo with a value list using Active and Archived. On my form I have an option group with the default being set to 1 or active. Sometimes I wish to set the status to archive so the record does no appear on the form bu not delete it. I also set the criteria for the query that the form uses for the field status to 1 meaning active. I am using a Do.Cmd.ShowAllRecords (on click event for a checkboxl on the form to view all record but of course it does not work.I need a solution for this problem.
P.S. I want to be able to view ALL records on command but then go back to the default when either the form is loaded again or another event is triggered.
08-03-12, 04:18 #2Jaded Developer
Provided Answers: 59
- Join Date
- Nov 2004
- out on a limb
suggest you use a command button or unbound checkbox
place some code behind the button OR the checkbox
say you decide to use a checkbox
when the form first loads (in the on load event) set the default value for the checkbox
the code behind the check box should apply or remove the filter.
say you use a label of 'show all' for the checkbox
if checkboxcontrol.value = vbtrue then
me.filter = ''
me.filter = 'Status = "Active"'
me.requeryI'd rather be riding on the Tiger 800 or the Norton