Toggle Button

nhcaver

Registered User.
Local time
Today, 16:19
Joined
Sep 12, 2009
Messages
17
Question with toggle buttons...since the behaviour of a toggle button is the same as a check (tick) box, True/False, Yes/NO, -1/0...that part I get with little difficulty.

I have a form based off of qryUpdate. Now I am trying to use this form for a couple of things:
1)Display the record based upon qryUpdate
2)Append the current record based upon this qryUpdate to an Archived table (tblDeleted)
3)After the record is appended to the tblDeleted, I want to delete the record from the current table.

That part all works fine, but here is the rub. I am trying (maybe erroneously) to use a Toggle Button to add a falue to a field in the tblDeleted. I have tried the botton both bound and unbound to the corresponding column in the table (I have also made sure that the column is formatted as a Yes/No, and also tried it as a true/false). I am not quite sure where I have gone awry.

dbNewbie here, so I am sure that it is something simple. :rolleyes: I know just enough to envision what I want to do but not enough experience to get there just yet...
 
Last edited:
The bound toggle button should be able to change the value but it will not change in the table until the record is updated by moving to another record.

Incidentally, as you are changing a field in the deleted table using a form it would appear that you are not working with very many records and would be unnecessarily making your life hard by moving the records to another table.

Simply flag the records as archived and adjust your queries to hide them from the main forms. Millions of records are not a problem for Access particularly when using indexed fields.
 
GalaxiomAtHome's advice is right on the money. It's pretty SOP in Access to simply have a checkbox to denote "deleted" records, with the query (all forms should really be based on queries, even if only one table is involved) set up to only show records where the "deleted" checkbox is unticked. This also makes it super easy to retrieve an accidentally "deleted" record.
 

Users who are viewing this thread

Back
Top Bottom