Results 1 to 8 of 8

Thread: Error Trapping [resolved]

  1. #1

    Thread Starter
    Addicted Member aldinator's Avatar
    Join Date
    May 2002
    Location
    Canada - better than all the rest!
    Posts
    216

    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.

  2. #2
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Have you tried On Error Resume Next?

  3. #3

    Thread Starter
    Addicted Member aldinator's Avatar
    Join Date
    May 2002
    Location
    Canada - better than all the rest!
    Posts
    216
    ya - but it happens when i load a different form that has the data controls

  4. #4
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Perhaps you should check the count of the objects before you try to load them.

  5. #5

    Thread Starter
    Addicted Member aldinator's Avatar
    Join Date
    May 2002
    Location
    Canada - better than all the rest!
    Posts
    216
    well what happens is the second i go frm.show on the form with the dtas, it errors - so i can't really

  6. #6
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Post the code that causes the error.

  7. #7

    Thread Starter
    Addicted Member aldinator's Avatar
    Join Date
    May 2002
    Location
    Canada - better than all the rest!
    Posts
    216
    ya know what - i just solved my prob:
    VB Code:
    1. With frmStudentRecord.dtaSR.Recordset
    2.     If .BOF = True And .EOF = True Then
    3.         MsgBox "blank"
    4.         Exit Sub
    5.     End If
    6. 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

  8. #8
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    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
  •  



Click Here to Expand Forum to Full Width