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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie :Opening a Recordset

Status
Not open for further replies.

yang101

IS-IT--Management
Oct 19, 2004
3
US
Set Rec = New ADODB.Recordset
Rec.Open ("SELECT JN from Projects Where JN ='" & Job & "';")

It does not like Rec.Open and I cannot find what exactly will allow me to open the Table and Get the chart data.

Yang101
 
You will at least need a connection:

[tt]Rec.Open "SELECT JN from Projects Where JN ='" & Job & "'", _
currentproject.connection[/tt]

Which should give you a readonly, forwardonly recordset.

Check the help files on the open method, the appropriate cursor and locktype, and/or search these fora, there are lot of threads containing methods of opening recordsets.

Also perhaps have a look at faq181-2886 on how to get the most out of the membership. This is the query and sql forum, the question might perhaps be better addressed in forum705 (Access VBA)

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top