A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Open singleview form with cbo restricted to the SB combobox value



 
 
Thread Tools Display Modes
  #1  
Old December 8th, 2008, 02:57 PM posted to microsoft.public.access.gettingstarted
Mishanya
external usenet poster
 
Posts: 197
Default 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  
Old December 8th, 2008, 05:12 PM posted to microsoft.public.access.gettingstarted
Ken Sheridan
external usenet poster
 
Posts: 3,433
Default 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  
Old December 8th, 2008, 08:17 PM posted to microsoft.public.access.gettingstarted
Mishanya
external usenet poster
 
Posts: 197
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.