Delete A Row From Table Based On Form Control Criteria

jleval

Registered User.
Local time
Today, 17:32
Joined
May 16, 2012
Messages
53
I have a form that is some how set to read only. It wont allow me to delete any records directly from the form.

What I would like to do is create a command button that deletes a row from the underlying table. I would like the row being deleted from the underlying table to be based on a control in the form.

I know the first response would be to figure out why I cant delete from the form, but I would really like to learn how to delete a row from the underlying table so that I can use it for other purposes.

NOTE: The PrimaryKey is a replication ID- Any way to get around the error that comes up on the findfirst method?

Any Ideas as to how I could do this?
 
Last edited:
Build a DELETE Query off the Data TABLE, and BUILD the criteria in the unique field you wish to use as the record(s) identifier as [Form]![Field] where [Form]![Field] is the open form and field you are viewing

Attach this Query to a command BUTTON on the same form.

I use such queries all the time so, hopefully, this will work for you ...
 

Users who are viewing this thread

Back
Top Bottom