trackdaychamp
Access Guy
- Local time
- Today, 17:31
- Joined
- Jan 22, 2007
- Messages
- 26
Hi,
I need to convert some old code to ADODB format and I am having trouble finding the correct methods to use with the ADODB Recordset objects
Old Method -> New Method with ADODB connection objects
1 FindFirst() -> Find()? (I think this one will be ok)
2 NoMatch() -> ???
See old code below:
Dim db As Database
Dim rtable As Recordset
Dim dtable As Recordset
Set db = CurrentDb()
Set rtable = db.OpenRecordset("Tbl_I", dbOpenDynaset)
Set dtable = db.OpenRecordset("Tbl_d", dbOpenDynaset)
StrCriteria = "[IntID] = " & "'" & Me![lstInt].Column(0) & "'"
rtable.FindFirst StrCriteria
If Not rtable.NoMatch Then
dtable.AddNew
dtable("ProjectID") = rtable("ProjectID")
dtable("Interdependency") = rtable("Interdependency"
dtable.Update
'...............delete risk from live system
rtable.Delete
End If
I need to convert some old code to ADODB format and I am having trouble finding the correct methods to use with the ADODB Recordset objects
Old Method -> New Method with ADODB connection objects
1 FindFirst() -> Find()? (I think this one will be ok)
2 NoMatch() -> ???
See old code below:
Dim db As Database
Dim rtable As Recordset
Dim dtable As Recordset
Set db = CurrentDb()
Set rtable = db.OpenRecordset("Tbl_I", dbOpenDynaset)
Set dtable = db.OpenRecordset("Tbl_d", dbOpenDynaset)
StrCriteria = "[IntID] = " & "'" & Me![lstInt].Column(0) & "'"
rtable.FindFirst StrCriteria
If Not rtable.NoMatch Then
dtable.AddNew
dtable("ProjectID") = rtable("ProjectID")
dtable("Interdependency") = rtable("Interdependency"
dtable.Update
'...............delete risk from live system
rtable.Delete
End If