I am trying to access a database, but get an error. This is the code i am using.

Form Load
VB Code:
  1. Private Sub Form_Load()
  2. MyFile = App.Path & "\Copy of Diary.mdb"        
  3. Set MyDatabase = OpenDatabase(MyFile)
  4. End Sub

Command Button
VB Code:
  1. SqLtXt = "SELECT Entry.Date, Entry.Subject, Entry.Entry"
  2. SqLtXt = SqLtXt + " From Entry"
  3. SqLtXt = SqLtXt + " WHERE Entry.Date = " & dtpDate.Value
  4.    
  5. Set MySearch = MyDatabase.OpenRecordset(SqLtXt)
  6.  
  7. txtSubject.Text = MySearch!Subject & ""
  8. txtEntry.Text = MySearch!Entry

What am i doing wrong, the error is...

"3021, No current record".

Which isnt true because there is a record called 03/06/2005 in the database.

Thank you
ILMV