|
-
Oct 26th, 1999, 12:21 AM
#1
Thread Starter
New Member
How do I prevent my Program from crashing when I delete the only record in the recordset.
Thankx in advance....
-
Oct 26th, 1999, 03:27 AM
#2
Frenzied Member
There are a number of ways.
1) don't delete the last record. I have an application that tells the user they cannot delete the last record (it checks to see how many records are stored in the DB prior to deleting. If record count = 1, msgbox user)
2) you could use the command:
On Error resume next
This could, however lead to spurious errors occurring until you get a record in your database.
3) don't use bound controls. Jet and ODBC don't care if your tables are populated. You'll still need to deal with coding for empty tables, though.
4) a modification of # 1 above, if it's the last record, delete the record you want after adding a new one.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|