|
-
May 14th, 2006, 07:33 AM
#1
Thread Starter
Fanatic Member
"The Current row is not available"
Hi,
Why this error occurs?
Regards.
Seema_s
-
May 14th, 2006, 09:49 AM
#2
Fanatic Member
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?
-
May 14th, 2006, 11:45 PM
#3
Thread Starter
Fanatic Member
Re: "The Current row is not available"
 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:
Private Sub Form_Unload(Cancel As Integer)
Dim oForm As Form
If rs.State = adStateOpen Then
rs.Close
End If
If db.State = adStateOpen Then
db.Close
End If
For Each oForm In Forms
Unload oForm
Next
End Sub
Seema_S
-
May 14th, 2006, 11:56 PM
#4
Hyperactive Member
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.
-
May 15th, 2006, 12:16 AM
#5
Thread Starter
Fanatic Member
Re: "The Current row is not available"
 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
-
May 15th, 2006, 12:22 AM
#6
Hyperactive Member
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.
-
May 15th, 2006, 02:23 AM
#7
Thread Starter
Fanatic Member
Re: "The Current row is not available"
 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
-
May 15th, 2006, 02:40 AM
#8
-
May 15th, 2006, 03:01 AM
#9
Hyperactive Member
Re: "The Current row is not available"
Press F8 untile u get error message
-
May 15th, 2006, 03:08 AM
#10
Thread Starter
Fanatic Member
Re: "The Current row is not available"
 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
-
May 15th, 2006, 03:14 AM
#11
Hyperactive Member
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 
-
May 15th, 2006, 03:15 AM
#12
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...
-
May 15th, 2006, 03:21 AM
#13
-
May 15th, 2006, 03:46 AM
#14
Re: "The Current row is not available"
why dont u try it out in the form query unload event ??
-
May 15th, 2006, 04:55 AM
#15
Thread Starter
Fanatic Member
Re: "The Current row is not available"
 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
-
May 15th, 2006, 05:06 AM
#16
-
May 15th, 2006, 11:49 PM
#17
Hyperactive Member
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.
-
May 16th, 2006, 02:37 AM
#18
Thread Starter
Fanatic Member
Re: "The Current row is not available"
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|