Filtering Form by Checkbox

JPed

Registered User.
Local time
Today, 22:24
Joined
Feb 11, 2014
Messages
29
Hi there,

I have a form (Packing) which feeds into a table called "Inputs". I have managed to make it so that when a checkbox is ticked, a "Date Packed" appears signalling the time it was picked.

At the moment I am pleased with the layout of my form (currently in a database view) and how it links to the table, however when I begin inputting thousands of records, I want to be able to not scroll to the bottom of the page to find those that are unchecked.

Would there be a filter that I could apply somewhere so that only records with an unchecked box would show in this form?

http://i1350.photobucket.com/albums/p777/JPed1/accessproblem4_zps17790c03.png

This is what my form currently looks like; maybe there is a way in the clicked event of the checkbox to hide records in this form once it has been selected?

Any help would be appreciated!
 
Something like
Me.Filter = "[date packed] is null"
me.filteron = true

May need some revision, unsure if this is 100% correct from memory and to lazy to go test if for you ! You shouldnt actually need the "Packed" column in this case, anything wihtout a date would not be packed, anything with a date is packed. This is a derived column which in proper databases you do not store.

Please take notice of Name conventions !!
 
the fact that you want it clicked to fill the date, doesnt mean the checkbox actually needs to be a column in the table. It should indeed be a simple unbound field that is updated depending on your date column.

You could stick the code under, for example, a button that can be clicked to filter your form.

Or perhaps...
Code:
if me.filteron then
    me.filteron = false
else 
    Me.Filter = "[date packed] is null" 
    me.filteron = true
endif
So the button can be clicked again to unfilter the form :)
 

Users who are viewing this thread

Back
Top Bottom