J
Jean
Hi,
Below is our code, we are running MSSQL 2000 with SP2, MSACCESS 2002. This application is converted from MSACCESS 97/MSSQL 7.0.
We ran into the error "ODBC Call Failed, 3146" at the last line of the below statement, and don't know what caused the error. The select query "qryTotalBatchAmount" ran just fine if we executed in Query design, but not inside the code.
=======================================
Dim varReturn As Variant
Dim rs As Recordset
Dim qdf As QueryDef
If IsNull(Me.cboBatchID) Then
MsgBox "You Must Select a Batch to Proceed", vbCritical, "Select a Batch"
Exit Sub
End If
Set qdf = gdb1.QueryDefs("qryMemberPostedPaymentsCount")
qdf.Parameters("IDX") = Me.cboBatchID
Set rs = qdf.OpenRecordset()
If rs!CountIDX > 0 Then
MsgBox "Records for this batch have previously been posted." _
& vbCrLf & "Please Contact Your System Administrator!", _
vbCritical, "Process Aborted!!"
GoTo cmdPostExit
End If
Set qdf = gdb1.QueryDefs("qryTotalBatchAmount")
qdf.Parameters("lngBatchID") = Me.cboBatchID
Set rs = qdf.OpenRecordset()
===============================================
Any suggestion is appreciated.
Thanks
Jean
Below is our code, we are running MSSQL 2000 with SP2, MSACCESS 2002. This application is converted from MSACCESS 97/MSSQL 7.0.
We ran into the error "ODBC Call Failed, 3146" at the last line of the below statement, and don't know what caused the error. The select query "qryTotalBatchAmount" ran just fine if we executed in Query design, but not inside the code.
=======================================
Dim varReturn As Variant
Dim rs As Recordset
Dim qdf As QueryDef
If IsNull(Me.cboBatchID) Then
MsgBox "You Must Select a Batch to Proceed", vbCritical, "Select a Batch"
Exit Sub
End If
Set qdf = gdb1.QueryDefs("qryMemberPostedPaymentsCount")
qdf.Parameters("IDX") = Me.cboBatchID
Set rs = qdf.OpenRecordset()
If rs!CountIDX > 0 Then
MsgBox "Records for this batch have previously been posted." _
& vbCrLf & "Please Contact Your System Administrator!", _
vbCritical, "Process Aborted!!"
GoTo cmdPostExit
End If
Set qdf = gdb1.QueryDefs("qryTotalBatchAmount")
qdf.Parameters("lngBatchID") = Me.cboBatchID
Set rs = qdf.OpenRecordset()
===============================================
Any suggestion is appreciated.
Thanks
Jean