Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how close the connection and still navigate the rst?

Status
Not open for further replies.

tag013

Programmer
Oct 15, 2003
9
GB
Hi,does anyone know if it is possible to close the connection (cnn.close) and still be able to retrieve or navigate the recordset?
I have class that when initialized it open the connection and the recordset. However, until that recordset is open i cannot manipulate it from other forms. Therefore, i would like to close it and re-open it later but i need to be able to navigate through that recordset.
Thanks for any tips





 
You should be able to set the Connection property of the Recordset to null, which dis-connects the recordset from the database.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Thanks for the reply, now i have another problem though. i tried everything possible to solve it: NO CHANCE.
On the same form i have a cmd button that allows the user to find a client. By clicking ok all the clients details are displayed on the main form. There are different ways that i tried to retrieve and display the details including the use of the "find" method. They all work fine. However, i cannot get the cursor pointing at the current record in the rst to move to the record found. Therefore, i have problems when editing the record found. also, when i click the movenext cmd it moves to the record following the one pointed to by the cursor.
Here's the code:

dim id
Dim criteria As Variant
criteria = "CliID = " & id
With crst
.Find criteria, , adSearchForward
Call store_details
End With

it calls the store_details sub to display the details in the main form. Please Help:
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top