Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a tick box to archive records

Status
Not open for further replies.

cwbviper

Technical User
Oct 22, 2002
101
0
0
GB
Hi there,

I have created a Personnel Database at work, as is the norm, people come and go. I was hoping to add in a tick box where if it is selected, the current record will not be shown in the form, but, it will still be stored in the table relating to the form.

Any help much appreciated.

Cheers

Colin
 
set the forms recordsource to point to a query
&quot;SELECT * FROM tablename WHERE tablename.tickbox <> TRUE&quot;
 
So if i create a query based on the initial table i created, and use this new query as the record source with the code, it should allow me to archive clients?

Cheers for helping

Colin
 
Short answer: Yes.
It will only display non-archived records in your form, but you can always tick one client and he will not appear next time you open the form.
You should then of course create a tickbox on your start-form like &quot;display inactive clients&quot; which when checked would open another form based on the invers query
SELECT * FROM tablename WHERE tablename.tickbox =-1&quot;
to enable you to re-activate clients if necessary.

BTW:SELECT * FROM tablename WHERE tablename.tickbox =0&quot; would be an equivalent to dazzer's SQL. It's a matter of taste whether you prefer TRUE and FALSE or -1 resp. 0.

Was that a short answer? No it wasn't! :-D

Good luck,
Andy

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
Thanks for all the help, i'll give it a try.

Cheers

Colin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top