If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Open singleview form with cbo restricted to the SB combobox value
I have SwitchBoard with cboSelectReferent and control-button wich is supposed
to open MyForm. MyForm has cboSelectClient and shows information bound to the selected client. 1) I need to program the SB button to open MyForm with cboSelectClient value list restricted to the referent, selected in the cboSelectReferent. 2) If no referent is selected, I want the MyForm to open with unrestricted cboSelectClient value list. 3) If possible, MyForm will always open blank (not with the first client recordset), then I could select client from restricted/unrestricted cboSelectClient (I can do so now by having "DoCmd.GoToRecord , , acNewRec" command in OnOpen event, but it might not work if MyForm will be opened by the restricting operation). please help. |
#2
|
|||
|
|||
Open singleview form with cbo restricted to the SB combobox value
The RowSource property of cboSelectClient should be a query which restricts
the rows returned to those where the Referent column matches the currently selected referent in the switchboard form's cboSelectReferent control or that control is Null (which will return all referents in the list). In query design view put the following (all as one line) in the Criteria row of the Referent column: Forms!frmSwitchboard!cboSelectReferent Or Forms!frmSwitchboard!cboSelectReferent Is Null Opening the form at a new record as you are at present should pose no problem. Ken Sheridan Stafford, England "Mishanya" wrote: I have SwitchBoard with cboSelectReferent and control-button wich is supposed to open MyForm. MyForm has cboSelectClient and shows information bound to the selected client. 1) I need to program the SB button to open MyForm with cboSelectClient value list restricted to the referent, selected in the cboSelectReferent. 2) If no referent is selected, I want the MyForm to open with unrestricted cboSelectClient value list. 3) If possible, MyForm will always open blank (not with the first client recordset), then I could select client from restricted/unrestricted cboSelectClient (I can do so now by having "DoCmd.GoToRecord , , acNewRec" command in OnOpen event, but it might not work if MyForm will be opened by the restricting operation). please help. |
#3
|
|||
|
|||
Open singleview form with cbo restricted to the SB combobox va
Thank U!
"Ken Sheridan" wrote: The RowSource property of cboSelectClient should be a query which restricts the rows returned to those where the Referent column matches the currently selected referent in the switchboard form's cboSelectReferent control or that control is Null (which will return all referents in the list). In query design view put the following (all as one line) in the Criteria row of the Referent column: Forms!frmSwitchboard!cboSelectReferent Or Forms!frmSwitchboard!cboSelectReferent Is Null Opening the form at a new record as you are at present should pose no problem. Ken Sheridan Stafford, England "Mishanya" wrote: I have SwitchBoard with cboSelectReferent and control-button wich is supposed to open MyForm. MyForm has cboSelectClient and shows information bound to the selected client. 1) I need to program the SB button to open MyForm with cboSelectClient value list restricted to the referent, selected in the cboSelectReferent. 2) If no referent is selected, I want the MyForm to open with unrestricted cboSelectClient value list. 3) If possible, MyForm will always open blank (not with the first client recordset), then I could select client from restricted/unrestricted cboSelectClient (I can do so now by having "DoCmd.GoToRecord , , acNewRec" command in OnOpen event, but it might not work if MyForm will be opened by the restricting operation). please help. |
Thread Tools | |
Display Modes | |
|
|