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

Opening A table to Update

Status
Not open for further replies.

coughnut

Programmer
Dec 6, 2005
27
0
0
US
I want to open two table and want to be able to update one table. So far here is what I am doing to open one table:

Dim rsTemp As New ADODB.Recordset

rsTemp.Open "SELECT * FROM tempTable", CurrentProject.Connection, adOpenKeyset, adLockOptimistic

Help please....
 
How about
Code:
Dim rst As ADODB.Recordset
Dim strSQL As String

Set conDatabase = CurrentProject.Connection
Set rst = New Recordset
strSQL = "SELECT * FROM tempTable"

rst.Open strSQL, conDatabase, adOpenDynamic, adLockOptimistic
 
Oops, I think you wanted:
rst.Open strSQL, conDatabase, [blue]adOpenKeyset[/blue], adLockOptimistic
 
Thank you so very much.. I will sure try that...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top