Hi guys
I have a frontend built in Access 2010 and backend in Access 2003. Now I am writing the code to populate a drop down box but it doesn't work
Any suggestions will be much appreciated.
I have a frontend built in Access 2010 and backend in Access 2003. Now I am writing the code to populate a drop down box but it doesn't work
Any suggestions will be much appreciated.
Code:
Private Sub RequesteeName_Change()
Dim strText, strFind As String
strText = Me.RequesteeName.Text
If Len(Trim(strText)) > 0 Then
strsql = "SELECT Name, Dept FROM tblElevateEmployee where Name like '" & strtext & "*' ORDER BY Name;"
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data source=J:\abs\Pennywell\» Case Trackers\DO NOT USE 2010 test version\2003 Backend Database.mdb;"
Set rs = CreateObject("ADODB.Recordset")
rs.Open strsql, cn, adOpenKeyset, adLockOptimistic
[COLOR=red]RequesteeName.RowSource = rs.fields(0)
[/COLOR]End If
End Sub