ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Recordset Searches (https://www.excelbanter.com/excel-programming/366795-recordset-searches.html)

James McDowell[_2_]

Recordset Searches
 
I have created a connection using a DSN and then Opened a recordset.

The queries is running fine, but I have lost the ability to .FINDFIRST or
..FINDNEXT

What else can I use? I have written a loop to test for my condition, but it
is not running nearly as fast when i was able to .FINDXXX

Any thoughts?

Thank you,
Jim

Tim Williams

Recordset Searches
 
What kind of cursor are you using?

--
Tim Williams
Palo Alto, CA


"James McDowell" wrote in message
...
I have created a connection using a DSN and then Opened a recordset.

The queries is running fine, but I have lost the ability to .FINDFIRST or
.FINDNEXT

What else can I use? I have written a loop to test for my condition, but it
is not running nearly as fast when i was able to .FINDXXX

Any thoughts?

Thank you,
Jim




PaulD

Recordset Searches
 
Can you elaborate on what you mean by lost the ability to .FINDFIRST? Do
you get an error message? Does nothing happen? Can you provide more of your
code and show what line the error occurs on (if you are getting an error
message)?
Paul D

"James McDowell" wrote in message
...
: I have created a connection using a DSN and then Opened a recordset.
:
: The queries is running fine, but I have lost the ability to .FINDFIRST or
: .FINDNEXT
:
: What else can I use? I have written a loop to test for my condition, but
it
: is not running nearly as fast when i was able to .FINDXXX
:
: Any thoughts?
:
: Thank you,
: Jim



James McDowell[_2_]

Recordset Searches
 
Set SALES_rcd = conSQl.OpenRecordset(Sales_sql, dbOpenSnapshot)

With SALES_rcd
myfind = "LOT = '" & ActiveCell.Value & "'"
Debug.Print .RecordCount

.FindFirst myfind

End With

I get a Run Time error message 3251 that says "Operation is not supported
for this type of Object"

"PaulD" wrote:

Can you elaborate on what you mean by lost the ability to .FINDFIRST? Do
you get an error message? Does nothing happen? Can you provide more of your
code and show what line the error occurs on (if you are getting an error
message)?
Paul D

"James McDowell" wrote in message
...
: I have created a connection using a DSN and then Opened a recordset.
:
: The queries is running fine, but I have lost the ability to .FINDFIRST or
: .FINDNEXT
:
: What else can I use? I have written a loop to test for my condition, but
it
: is not running nearly as fast when i was able to .FINDXXX
:
: Any thoughts?
:
: Thank you,
: Jim





All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com