DAO delete

gguy

Registered User.
Local time
Today, 11:29
Joined
Jun 27, 2002
Messages
104
I have a subform that is bound to a table called last_test. This subform show the first record in the last_test table. When I close the main form I want to delete the first record in the last_test table. So, when I return to the main form the next record is showing in the subform.

I am looking at DAO DeleteRecord.

I figured that I could delete the record based on the ID field which is unique. I am not seeing a way to make DeleteRecord see the specific ID.

Thanks, GGuy
 
What do yumean by first record? Is it the first record yu subform shows? Records are not necessary stored in the seqence they're displayed.

Delete the desigred record using some known criteria. Using the ID is a good way to do it.

dim da as dao.database
set db=currentdb
db.EXECUTE "DELETE * FROM tblYourTable WHERE [ID] =" & Me!ID
 

Users who are viewing this thread

Back
Top Bottom