As a beginner, I am having trouble getting the following to work
This works fine and lists all the Records I require
Private Sub Form_Load()
Data1.DatabaseName = PathToDB
Set Database = OpenDatabase(PathToDB)
Set rs = Database.OpenRecordset("SELECT * FROM Fleet")
'if no records,leave the sub
If rs.EOF Then Exit Sub
MyTotalCount = .RecordCount
For iVal = 0 To MyTotalCount - 1
lstFleet.AddItem "Registration " + !RegNo
However, I now want to click on one of the records and delete it.
I would also have expected the first record to be highlighted but no records are.
Also how do I get the record that is clicked, to highlight ?