here is my code. I am getting Error:
Run time Error '3021':
Either BOF or EOF is true or the curent record has been deleted.
================================
Dim Conn3 As ADODB.Connection, rst3 As ADODB.Recordset, SQLcode3, strSQL As String
Set Conn3 = New ADODB.Connection
Set rst3 = New ADODB.Recordset
Conn3.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\smallbserver\AppsSBS\Encore\FilePaths.mdb"
SQLcode3 = "SELECT * FROM [Drawing-Paths] WHERE Drawing Like '" & Extension & "*';"
rst3.Open SQLcode3, Conn3, adOpenStatic, adLockOptimistic
'Instantiate a Recordset object.
Set rst3 = New ADODB.Recordset
'Open a recordset using the Open method
'and use the connection established by the Connection object.
strSQL = "SELECT * FROM [Drawing-Paths] WHERE Drawing Like '" & Extension & "*';"
rst3.Open strSQL, Conn3, , , adCmdText
rst3.MoveFirst
Debug.Print rst3!Path
=============================
I just need to return one record from the database.
TIA
DougP, MCP
Visit my WEB site to see how Bar-codes can help you be more productive
Run time Error '3021':
Either BOF or EOF is true or the curent record has been deleted.
================================
Dim Conn3 As ADODB.Connection, rst3 As ADODB.Recordset, SQLcode3, strSQL As String
Set Conn3 = New ADODB.Connection
Set rst3 = New ADODB.Recordset
Conn3.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\smallbserver\AppsSBS\Encore\FilePaths.mdb"
SQLcode3 = "SELECT * FROM [Drawing-Paths] WHERE Drawing Like '" & Extension & "*';"
rst3.Open SQLcode3, Conn3, adOpenStatic, adLockOptimistic
'Instantiate a Recordset object.
Set rst3 = New ADODB.Recordset
'Open a recordset using the Open method
'and use the connection established by the Connection object.
strSQL = "SELECT * FROM [Drawing-Paths] WHERE Drawing Like '" & Extension & "*';"
rst3.Open strSQL, Conn3, , , adCmdText
rst3.MoveFirst
Debug.Print rst3!Path
=============================
I just need to return one record from the database.
TIA
DougP, MCP
Visit my WEB site to see how Bar-codes can help you be more productive