thefourthwall
IS-IT--Management
Hello,
I have a form from an existing query. The form displays cell phone #, ESN, Employee ID number, etc.
I created a combo box called cboCellNumSearch, using the built-in wizard and want the combo box to update the various controls based on the cell number I choose from the list.
Here's the query:
and the code behind the combo box (in the After Update event is
The controls do not update when I select a cell number from the list; what am I doing wrong?
I have a form from an existing query. The form displays cell phone #, ESN, Employee ID number, etc.
I created a combo box called cboCellNumSearch, using the built-in wizard and want the combo box to update the various controls based on the cell number I choose from the list.
Here's the query:
Code:
SELECT tblDevice.Cell_Number, tblDevice.Spare, tblDevice.Aircard, tblDevice.EID, tblDevice.Carrier, tblDevice.Model, tblDevice.Date_Last_Change, tblDevice.Direct_Connect_Number, tblDevice.Comments, tblDevice.ESN, tblEmployee.LAST_NAME, tblEmployee.FIRST_NAME, tblEmployee.MIDDLE_INITIAL, tblEmployee.NAME_SUFFIX, tblEmployee.EMPLOYEE_ID, tblEmployee.SHIELD, tblEmployee.TZS_CODE, tblEmployee.TITLE_CODE, tblEmployee.DATE_OF_ENTRY, tblEmployee.DATE_OF_RANK, tblEmployee.AD_USER_NAME, tblEmployee.SEX_CODE, tblEmployee.TZS_DESCRIPTION, tblEmployee.TITLE_DESCRIPTION, tblDevice.DoNotDisplayInAD
FROM tblDevice LEFT JOIN tblEmployee ON tblDevice.EID = tblEmployee.EMPLOYEE_ID
ORDER BY tblDevice.Cell_Number;
Code:
Private Sub cboCellNumSearch_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[EID] = " & Str(Nz(Me![cboCellNumSearch], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub