Results 1 to 18 of 18

Thread: "The Current row is not available"

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2005
    Posts
    570

    "The Current row is not available"

    Hi,

    Why this error occurs?

    Regards.

    Seema_s

  2. #2
    Fanatic Member mateo107's Avatar
    Join Date
    Jan 2005
    Posts
    547

    Re: "The Current row is not available"

    What's the context of the error. In and of itself, it's fairly self explanatory... However you're trying to access the row, it is not available.

    What type of Database are you using (MS Access?). When are you getting this error? What code are you running?



    -Matthew-

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2005
    Posts
    570

    Re: "The Current row is not available"

    Quote Originally Posted by mateo107
    What's the context of the error. In and of itself, it's fairly self explanatory... However you're trying to access the row, it is not available.

    What type of Database are you using (MS Access?). When are you getting this error? What code are you running?

    Hi,

    I am using MS Access. When I am trying to close it by clicking the top right button "X" it throws that error: "The current row is not available". I hope there some problem with using the following code. Could you please help me out?

    VB Code:
    1. Private Sub Form_Unload(Cancel As Integer)
    2. Dim oForm As Form
    3. If rs.State = adStateOpen Then
    4.     rs.Close
    5. End If
    6. If db.State = adStateOpen Then
    7.     db.Close
    8. End If
    9. For Each oForm In Forms
    10.     Unload oForm
    11. Next
    12. End Sub

    Seema_S

  4. #4
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Pakistan
    Posts
    436

    Re: "The Current row is not available"

    First of all you debug your form unload event. This error occurs when we are trying to access a recordset and it is closed. Most probably you will find error location during debuggin try it.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2005
    Posts
    570

    Re: "The Current row is not available"

    Quote Originally Posted by zubairkhan
    First of all you debug your form unload event.
    Thanks, Mr. Zubair! How to debug it? Can you explain a bit clear, please?

    Seema_S

  6. #6
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Pakistan
    Posts
    436

    Re: "The Current row is not available"

    in your vb editor click left side to your code line where u want to start debuggin when u click on left side of code a marron dot will appear, it is your debbuging point. Start your program when program reaches to your debugging pint it display code the press F8 for each step.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2005
    Posts
    570

    Re: "The Current row is not available"

    Quote Originally Posted by zubairkhan
    in your vb editor click left side to your code line where u want to start debuggin when u click on left side of code a marron dot will appear, it is your debbuging point. Start your program when program reaches to your debugging pint it display code the press F8 for each step.
    I tried. Just it is going through the lines highlighting in yellow color. How do I know that where the error occured?

    Seema_s

  8. #8
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    Re: "The Current row is not available"

    go on by pressing "F8" Key untill u get error..then u r able 2 know what is the line that causing 4 the error..
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

  9. #9
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Pakistan
    Posts
    436

    Re: "The Current row is not available"

    Press F8 untile u get error message

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2005
    Posts
    570

    Re: "The Current row is not available"

    Quote Originally Posted by nagasrikanth
    go on by pressing "F8" Key untill u get error..then u r able 2 know what is the line that causing 4 the error..
    Hi, I didnot fin any error during debugging. But when I try to close application using close button ("X") top right corner of the form the error occurs:

    The current row is not available. But when I close it clicking on close button which I put on the form, there is no error.

    Regards.

    Seema_s

  11. #11
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    Re: "The Current row is not available"

    strange....r u sure the error is related to this form only...

    Y i had this doubt means...I found in ur form_unload event ,u r trying to close all the forms....which might cause the problem...
    HTML Code:
    For Each oForm In Forms
        Unload oForm
    Next
    if u dont have any problem y can't u attach u r project... ???
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

  12. #12
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: "The Current row is not available"

    why dont u just use

    set rs = nothing where rs is your recordset instead of checking those if conditions...

  13. #13
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    Re: "The Current row is not available"

    hi litlewiki

    ofcourse we can use that...but is the problem if I use the if statement...any how there wasn't any error when checked in Debug mode...
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

  14. #14
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: "The Current row is not available"

    why dont u try it out in the form query unload event ??

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2005
    Posts
    570

    Re: "The Current row is not available"

    Quote Originally Posted by litlewiki
    why dont u try it out in the form query unload event ??
    I am completely messed in this problem. How to solve it or what is the best way to avoid such errors in future.

    Seema_S

  16. #16
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    Re: "The Current row is not available"

    Cooooll....

    Try to post the exact problem or project....dont be confuse....
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

  17. #17
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Pakistan
    Posts
    436

    Re: "The Current row is not available"

    Seema, you should check arround your forms wheither your wrote commands in forms Terminate or Deactivate Event. It may be possible this error returns from any other form.

  18. #18

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2005
    Posts
    570

    Re: "The Current row is not available"

    Quote Originally Posted by zubairkhan
    Seema, you should check arround your forms wheither your wrote commands in forms Terminate or Deactivate Event. It may be possible this error returns from any other form.
    It is ok. I will try to find out.

    seema_s

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