Hello again, i have a table in an Access database holding entries from a diary. Each entry has a Subject, the Entry itself and the Username (The author of the entry).

I want to do a search of the entire entry table, for one specific user, for example the user would be "Jim", and in VB i would use the .RecordCount to count the number of records in that query, thus showing how many entries the user has made.

This current code will only show the user "Ben" to have 1 entry, where he really has 3? Any ideas.?

VB Code:
  1. Sqltxt = "SELECT Entry.Username, Entry.Date, Entry.Subject, Entry.Entry"
  2. Sqltxt = sqltxt = " From Entry WHERE"
  3. Sqltxt = Sqltxt = " Entry.Username='" & UniUsername & "';"
  4. Set MySearch = MyDatabase.OpenRecordset(Sqltxt)
  5.    
  6. lblEntry.Caption = "You have " & MySearch.RecordCount & " entries"

Thank you
ILMV