-
Apr 24th, 2006, 03:42 PM
#1
Thread Starter
Hyperactive Member
Error: The current row is not available.
I am using VB 6.0, ADO commands, and Access 2000.
I am getting an error message saying...
The current row is not available.
This is how my form is set up.
A user double click an employee from a datagrid.
A second form appears with an SSTab. The first tab has textboxes, second tab has datagrid, and third tab has a datagrid. All of this information is related to the employee that was selected and populated correctly.
My problem occurs when i select any cell on the first two columns of either of the two datagrids. After selected a cell on the first two columns of either of the two datagrids and I exit the form I get the error message I stated at the very beginning.
If I select any of the other cells on the other columns or click anywhere on teh form or select anything else on the form and then try to exit I get no error message.
It doesn't seem to be doing any damage to the data or anything, but I'd still like to get rid of that error message and if possible understand why it is coming up.
Ok geniuses....do your thing! Cause my head is about here right now...
-
Apr 27th, 2006, 02:41 PM
#2
Thread Starter
Hyperactive Member
Re: Error: The current row is not available.
*bump*
So, any ideas on what this error means?
Or should I just make an error catch code?
-
Apr 27th, 2006, 07:48 PM
#3
Re: Error: The current row is not available.
Are you using adodc as your datasource of your datagrids? How are you setting the recordsource?
-
Apr 27th, 2006, 07:58 PM
#4
Thread Starter
Hyperactive Member
Re: Error: The current row is not available.
My data source is set using the following code...
Set cnMath = New ADODB.Connection
cnMath.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = " & App.Path & "\Math.mdb"
cnMath.Open
-
Apr 27th, 2006, 08:03 PM
#5
Re: Error: The current row is not available.
What is the datasource of your datagrids? A recordset object? How are you populating the recordsets?
-
Apr 27th, 2006, 08:09 PM
#6
Thread Starter
Hyperactive Member
Re: Error: The current row is not available.
Both datagrids are populated the same way, but I'll only post the coding for one of them to save space. Both datagrids display properly. Just that problem I said in my first post.
VB Code:
Dim strSQL As String 'variable to store SQL statement
strSQL = "SELECT tblStudent.fldStuLastName + ', ' + " & _
"tblStudent.fldStuFirstName + ' ' + " & _
"IIF(ISNULL(tblStudent.fldStuMiddleName), ' ', " & _
"tblStudent.fldStuMiddleName), tblTutorHistory.fldTutorDate, " & _
"tblTutorHistory.fldHoursTutored, tblTutorHistory.fldSubject FROM" & _
" tblTutorHistory INNER JOIN tblStudent ON tblStudent.fldStuID =" & _
" tblTutorHistory.fldStuID WHERE tblTutorHistory.fldEmpID = " & lblEmpID
Set rsTutorHistory = New ADODB.Recordset
rsTutorHistory.CursorLocation = adUseClient
rsTutorHistory.Open strSQL, Form2.cnMath, adOpenForwardOnly, adLockReadOnly, adCmdText
Set dgTutoringHistory.DataSource = rsTutorHistory
-
Apr 27th, 2006, 09:13 PM
#7
Re: Error: The current row is not available.
Is the AllowUpdate property of your DataGrids ticked/selected?
-
Apr 27th, 2006, 09:41 PM
#8
Thread Starter
Hyperactive Member
Re: Error: The current row is not available.
Originally Posted by dee-u
Is the AllowUpdate property of your DataGrids ticked/selected?
The AllowUpdate properties for both datagrids are set to False.
-
May 1st, 2006, 10:25 AM
#9
Thread Starter
Hyperactive Member
Re: Error: The current row is not available.
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
|