none
Flag Record in Non updatable recordset RRS feed

  • Question

  • Thanks for taking the time to read my question.

    I have a form with a subform. The recordsource of the subform in not updatable. I need to be able to flag individual records so that the user can delete them. I can do that perhaps with a Recordsetclone, but just not sure how to flag the records to start.

    Any help would be great.

    Thanks,
    Brad

    Tuesday, August 8, 2017 9:52 PM

Answers

  • Hi Brad,

    You can update the table itself in the background and then refresh the form to show the flag. For example, you can use an UPDATE query to flag the record in the table, such as:

    CurrentDb.Execute "UPDATE TableName SET FlagField=True WHERE ID=" & Me.ID

    Hope it helps...

    • Proposed as answer by Chenchen LiModerator Wednesday, August 9, 2017 6:00 AM
    • Marked as answer by mbrad Friday, August 11, 2017 9:44 PM
    Tuesday, August 8, 2017 9:58 PM

All replies

  • Hi Brad,

    You can update the table itself in the background and then refresh the form to show the flag. For example, you can use an UPDATE query to flag the record in the table, such as:

    CurrentDb.Execute "UPDATE TableName SET FlagField=True WHERE ID=" & Me.ID

    Hope it helps...

    • Proposed as answer by Chenchen LiModerator Wednesday, August 9, 2017 6:00 AM
    • Marked as answer by mbrad Friday, August 11, 2017 9:44 PM
    Tuesday, August 8, 2017 9:58 PM
  • worked! Thanks.
    Friday, August 11, 2017 9:44 PM
  • Hi, You're welcome. Glad we could assist. Good luck with your project.
    Friday, August 11, 2017 10:14 PM