J
JohnE
I am in a quandry as to get a combo box on a form to filter from another.
What I have is the following:
mainform = usrfrmClientSelection
cbx = cbxClientSelectionList
popup/modal form = frmAlphaSelect
cbo = cboAccountPerson
What I am trying to do is limit the clients showing in cbxClientSelectList
based on the name that is in cboAccountPerson.
I have been trying to use the following code with moving parts of it around.
But I continue to get the system input box asking for the cboAccountPerson
parameter. I get the message even when I go to close the mainform.
Forms![usrfrmClientSelection]!cbxClientSelectionList].SetFocus
Forms![usrfrmClientSelection]![cbxClientSelectionList].RowSource = _
"SELECT " & _
"ClientID, " & _
"ClientName, " & _
"ClientDBA, " & _
"ClientCode, " & _
"AccountManagementPerson, " & _
"AcctMgtPersonSupervisor " & _
"FROM usrtblClientInformation " & _
"WHERE (((AccountManagementPerson) =
[Forms]![frmAlphaSelect]![cboAccountPerson])) " & _
"ORDER BY ClientName ASC;"
Forms![usrfrmClientSelection]![cbxClientSelectionList].Dropdown
DoCmd.Close acForm, "frmAlphaSelect"
Forms![usrfrmClientSelection]![cbxClientSelectionList].Dropdown
If anyone can see the error of my ways, please let me know and how to correct.
Thanks in advance for any assistance.
*** John
What I have is the following:
mainform = usrfrmClientSelection
cbx = cbxClientSelectionList
popup/modal form = frmAlphaSelect
cbo = cboAccountPerson
What I am trying to do is limit the clients showing in cbxClientSelectList
based on the name that is in cboAccountPerson.
I have been trying to use the following code with moving parts of it around.
But I continue to get the system input box asking for the cboAccountPerson
parameter. I get the message even when I go to close the mainform.
Forms![usrfrmClientSelection]!cbxClientSelectionList].SetFocus
Forms![usrfrmClientSelection]![cbxClientSelectionList].RowSource = _
"SELECT " & _
"ClientID, " & _
"ClientName, " & _
"ClientDBA, " & _
"ClientCode, " & _
"AccountManagementPerson, " & _
"AcctMgtPersonSupervisor " & _
"FROM usrtblClientInformation " & _
"WHERE (((AccountManagementPerson) =
[Forms]![frmAlphaSelect]![cboAccountPerson])) " & _
"ORDER BY ClientName ASC;"
Forms![usrfrmClientSelection]![cbxClientSelectionList].Dropdown
DoCmd.Close acForm, "frmAlphaSelect"
Forms![usrfrmClientSelection]![cbxClientSelectionList].Dropdown
If anyone can see the error of my ways, please let me know and how to correct.
Thanks in advance for any assistance.
*** John