I am trying to link to tables in a database. I have used the following code,
but I get the following error
Run-time error '-2147467259 (80004005)':
Method 'RecordSet' of Object '_Form_Sales Order Log' failed.
What I am trying to do is while in the form Sales Order Log, but able to
access information in the customerdbnew table. Thanks for any help.
Private Sub ShipmentRequest_Click()
Set Me.Recordset = rstNwind
Dim cnnNwind As New ADODB.Connection
Dim rstNwind As New ADODB.Recordset
With cnnNwind
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Open "\\Backup\hosted files\CustomerDatabase\customerdbnew.mdb",
"admin"
End With
With rstNwind
Set .ActiveConnection = cnnNwind
.CursorType = adOpenKeyset
.CursorLocation = adUseClient
.LockType = adLockOptimistic
End With
Set Me.Recordset = rstNwind
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200508/1