oxicottin
Learning by pecking away....
- Local time
- Today, 00:57
- Joined
- Jun 26, 2007
- Messages
- 856
I have a form (frm_Main) that has a combo box (cboEmployee). I want to bring the selected of that combo box if there is one to another form (frm_Test) combo box (cboEmployee) if there is a value and have it selected. Basically like a default name if there is one in (frm_Main) (cboEmployee).
Here is what I have started in the (frm_Test) current:
Here is what I have started in the (frm_Test) current:
Code:
Private Sub Form_Current()
Dim strSQL As String
strSQL = "SELECT tbluEmployees.EmployeeID, [EmpLName] & "", "" & [EmpFName] AS EmployeeName, tbluEmployees.IsInactive, tbluEmployees.SupervisorID " & vbCrLf & _
"FROM tbluEmployees " & vbCrLf & _
"WHERE (((tbluEmployees.IsInactive)=False) AND ((tbluEmployees.SupervisorID)=[Forms]![frm_ReportSelection]![txtCurrentSelectedSupervisor])) " & vbCrLf & _
"ORDER BY [EmpLName] & "", "" & [EmpFName];"
If IsNull([Forms]![frm_YearCalendar]![cboEmployee]) Then
Me.cboEmployee.RowSource = strSQL
Else
'How do I get [Forms]![frm_YearCalendar]![cboEmployee] rowsource to show the selected value in the combo box?
End If
End Sub