Using a from to make a record hidden

A

Andy P

I have a form, which has a check box on it (linked to a
check box field on the controling Table). When this check
box is ticked I would like access to make the whole of
that record hidden in the form view, so I could if need be
to back to the table and un-check if I needed the record
to become 'visable' again in the form.

Reason is, that I use the form to look up a list of
current students, and if one leaves I would like to tick
the box and the students who have left no longer appear in
the form view.

Thanks in anticipation..
 
A

Andy

Thanks for getting back so quickly.
Just having a little trouble getting this to work. I have
typed the statement "Where chkField = false" into the
criteria box, but then it doesn't display any when I run
it, but if i set it to True then it disaplys all records
(including those with check or unchecked boxes)
Any ideas??
 
A

Andy

Other than that I would like it when I click the check box
on the form that the record immediatley disappears from
view (as the record becomes hidden)
 
R

Reggie

Andy, Change your criteria to: =False in your query not "Where chkField =
false" Now open the form in design view. Double-click the checkbox control
to open the properties window. Click the Event tab. Click the ellipsis
(...) next to the afterupdate event and type in the following

Private Sub chkField_AfterUpdate()
Me.Requery
End Sub

And the record will disappear. You may want to do this in the afterupdate
event of the record incase you have other changes you might want to make on
the record before it disappears.

Hope this helps
 
A

Arvin Meyer

The Select statement I used would be similar to what you would see in the
SQL window, not the QBE Grid (Design View) window. In the Query Design View,
simply type "False", without the quotes, in the Criteria Box. for the
checkbox field.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top