|
-
Sep 24th, 2002, 06:17 PM
#1
Thread Starter
Addicted Member
Error Trapping [resolved]
hey - i have it so when the person runs my program for the first time i extract a blank database (with the neccessary columns and whatnot). up to now, everything works great. the only problem is that when the user runs i get an error 3021: "No current record." how can i trap this error before i get it and add in an extra record so it'll work?
ps i don't want to add the record if the db isn't empty
Last edited by aldinator; Sep 24th, 2002 at 06:29 PM.
-
Sep 24th, 2002, 06:20 PM
#2
So Unbanned
Have you tried On Error Resume Next?
-
Sep 24th, 2002, 06:24 PM
#3
Thread Starter
Addicted Member
ya - but it happens when i load a different form that has the data controls
-
Sep 24th, 2002, 06:25 PM
#4
So Unbanned
Perhaps you should check the count of the objects before you try to load them.
-
Sep 24th, 2002, 06:26 PM
#5
Thread Starter
Addicted Member
well what happens is the second i go frm.show on the form with the dtas, it errors - so i can't really
-
Sep 24th, 2002, 06:27 PM
#6
So Unbanned
Post the code that causes the error.
-
Sep 24th, 2002, 06:29 PM
#7
Thread Starter
Addicted Member
ya know what - i just solved my prob:
VB Code:
With frmStudentRecord.dtaSR.Recordset
If .BOF = True And .EOF = True Then
MsgBox "blank"
Exit Sub
End If
End With
thanks anyways
but maybe you can help me with another problem - in about 5min check for a post in this forum called "VB closes after program closes"
thanks
mark a
-
Sep 24th, 2002, 06:32 PM
#8
So Unbanned
You're welcome, glad you got it fixed.
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
|