Hello.
My program reads records from an mdb database and populates a listview. I want to be able to delete a record from the database, the one which is selected in the listview.
The database has a table "Main" which has "ID" as the primary key (I keep these values in the Listview.ListItems.Item(ItemIndex).Tag.

Now I have the following:

Dim DB As Database
Dim RS As Recordset

Set DB = OpenDatabase(App.Path & "\Database\Database.mdb")
Set RS = DB.OpenRecordset("Main")

RS.MoveFirst

RS.Index = ("ID")

At the above command, I have a run-time error '3800':
'ID' is not an index in this table.

Can you tell me what's wrong? From what I understand, it means that "ID" is a wrong name (but it isn't really).