DougHomeOffice
Programmer
I use the code below in Access 2002 runtime, bu tI think
there is a DAO reference error. I am using Runtime but
the computer doesn't have office 2002, when I try to
install a new version of run time I get an active "x"
error. I tried going into an Excel module and open the
reference for DAO 3.6. I can just take out this code but
I am running into this problem all ove rwith Excel, Word,
etc.
-Doug
----------
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT Contacts.ContactID,
Contacts.LastName " & _
"FROM Contacts " & _
"WHERE [Contacts.LastName] LIKE '" &
Me.SearchForContact.Text & "*';"
Set rs = db.OpenRecordset(strSQL, dbOpenSnapshot)
If rs.RecordCount > 0 Then
rs.MoveFirst
Me.ContactList = rs!ContactID
End If
rs.Close
Set rs = Nothing
Set db = Nothing
.
there is a DAO reference error. I am using Runtime but
the computer doesn't have office 2002, when I try to
install a new version of run time I get an active "x"
error. I tried going into an Excel module and open the
reference for DAO 3.6. I can just take out this code but
I am running into this problem all ove rwith Excel, Word,
etc.
-Doug
----------
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT Contacts.ContactID,
Contacts.LastName " & _
"FROM Contacts " & _
"WHERE [Contacts.LastName] LIKE '" &
Me.SearchForContact.Text & "*';"
Set rs = db.OpenRecordset(strSQL, dbOpenSnapshot)
If rs.RecordCount > 0 Then
rs.MoveFirst
Me.ContactList = rs!ContactID
End If
rs.Close
Set rs = Nothing
Set db = Nothing
.