Whenever I delete the first record in my database VB generates an error. One way of avoising this is to disable the Delete menu at the first record.But is there a better ,logical way to avoid this?
Thankx in advance
Printable View
Whenever I delete the first record in my database VB generates an error. One way of avoising this is to disable the Delete menu at the first record.But is there a better ,logical way to avoid this?
Thankx in advance
Hi,
Before trying to Delete the first record in the database, are you actually positioning the record pointer (cursor) to the begining of the recordset?
If you aren't, then try it, because it may get rid of your problem.
And how do I actually point the cursor at the first record?Does it not actually come at the first record when I delete the second last record?
Use the MoveFirst method of the Recordset object. Check for BOF (Beginning of File) to see if you're already there. If both BOF and EOF are true, file is empty.