Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002

    Unhappy Unanswered: delete multiple records with checkbox

    i'm kind of newbie to that stuff.
    I'm trying to create a small db with 3 tables. 2 tables got 1 entry only( which are used for the combo list) the third table got all entries combined. ex: ID, location, Name, Keywords(table1), Categories(table2), and an Checkbox.

    as far as i can see i can add the records, edit them that's fine. However, I want to enable the check box, in such way that when selected , the specific record(s) data will be deleted, except the ID number(autonumber).Is this possible ?

    Any tips would be approciated

  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    if you delete the record, you delete the whole record - including it's autonumber. seems like you are not trying to do this but instead are trying to "delete" all/some fields but definitely not the autonumber.

    i'm not sure what your ultimate goal is so here are some thoughts:

    check that you really want to do what you say - there is no risk of your autonumber being accidentally reused for a later record. unless you anticipate some future use for the record with "deleted" fields - just delete the record.

    if you anticipate that you will reuse the "deleted" record data, why delete at all? you already have a checkbox (e.g. isDeletedBool) so you can set up a query with FALSE in the criteria box of the isDeletedBool field. you can then do everything with this query that you can do with the original table, and your "deleted" records will not show.
    a second query with isDeletedBool = TRUE gives you access to all those "deleted" records if/when you need them, including the possibility of "undeleting" them by unticking the isDeletedBool checkbox.

    if you really really really do want to "delete" some fields in all records with isDeletedBool = TRUE then the simplest way to achieve this is with an update query -- open a new query in design view; add the fields you want to "delete" and the isDeletedBool field; menu: Query¦UpdateQuery; put TRUE in the isDeletedBool criteria box and NULL in the updateTo boxes you want to "delete".

    final thought: add an entry to your table1 & table2 " <deleted>" and select this to "delete" the entry in the record.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts