This code worked yesterday but it wouldn't won't work today on the first or second run attempt. I got the error message "File Not Found." I closed the project, opened it again and the third time it worked fine. Worked fine on the fourth attempt too. Am I losing it or is VB6 and Access on drugs? I use XP SP3 and Access 2003, SP3.

Private Sub form_load()
Dim sPath As String

Open "MyDatabase.mdb" For Input As #1

Set dbMyDB = OpenDatabase("MyDatabase.mdb")
Set rsMyRS = dbMyDB.OpenRecordset("MyTable", dbOpenDynaset)

If Not rsMyRS.EOF Then rsMyRS.MoveFirst
Do While Not rsMyRS.EOF
lstRecords.AddItem rsMyRS!Name
lstRecords.ItemData(lstRecords.NewIndex) = rsMyRS!ID

End Sub

Private Sub lstRecords_Click()

rsMyRS.FindFirst "ID=" & Str(lstRecords.ItemData(lstRecords.ListIndex))
txtPhone.Text = rsMyRS!Phone
txtName.Text = rsMyRS!Name
txtMoCost.Text = rsMyRS!MoCost
txtKwh.Text = rsMyRS!kWh

End Sub