Problem in deleting records on the table through form (1 Viewer)

cbabi2

Member
Local time
Yesterday, 16:25
Joined
Sep 29, 2014
Messages
34
:confused: Hello, I have a form linked to a table and in my form there is a listbox reflecting the records in my table. Evereytime I tick a record in the list box the information on its corresponding columns appears on the text field.
So far I am able to add, modify and save record to my table using this form but I am having a problem on deleting a record which I selected on the listbox. I created a delete command button but it is not working. Please see attached database.
 

Attachments

  • Sample1xx.mdb
    396 KB · Views: 54

madefemere

Registered User.
Local time
Today, 02:25
Joined
Aug 3, 2013
Messages
80
Hello,

May be with this code :
Code:
dbs.Execute ("DELETE * FROM CORRES_TYP WHERE CODE = '" & Me.CODE & "' AND DESCRIPTION='" & Me.DESCRIPTION _
            & "' AND FOLDER = '" & Me.FOLDER & "'")
Good continuation
 

cbabi2

Member
Local time
Yesterday, 16:25
Joined
Sep 29, 2014
Messages
34
Thank you very much madefemere for the quick reply. That code solves my problem...:)
 

Users who are viewing this thread

Top Bottom