C
Carol Grismore
I am using Access 2002. The following code segment executes the first read,
from rs, successfully, but gives me a "Run-time error 3146 ODBC--call
failed" on the second one from rs1. Both rs and rs1 are queries. Can anyone
give me information on this error?
Dim db as Database
Dim rs as Recordset
Dim rs1 as Recordset
Dim strUserID as String
Dim strProgram as String
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT program_id FROM sysuser WHERE sysuser_id =
'" & strUserID & "'", dbOpenDynaset)
rs.MoveFirst
strProgram = rs!program_id
If Right(strStartLoc, 2) = "10" Then
Set rs1 = db.OpenRecordset("SELECT * FROM report_db WHERE enabled = '" &
strUserID & "'", dbOpenDynaset)
....
End If
from rs, successfully, but gives me a "Run-time error 3146 ODBC--call
failed" on the second one from rs1. Both rs and rs1 are queries. Can anyone
give me information on this error?
Dim db as Database
Dim rs as Recordset
Dim rs1 as Recordset
Dim strUserID as String
Dim strProgram as String
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT program_id FROM sysuser WHERE sysuser_id =
'" & strUserID & "'", dbOpenDynaset)
rs.MoveFirst
strProgram = rs!program_id
If Right(strStartLoc, 2) = "10" Then
Set rs1 = db.OpenRecordset("SELECT * FROM report_db WHERE enabled = '" &
strUserID & "'", dbOpenDynaset)
....
End If