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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

display list box items per field selection on linked form



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2004, 05:46 PM
neen
external usenet poster
 
Posts: n/a
Default display list box items per field selection on linked form

Once selecting and storing a company name from a dropdown box on a form, how can I have only the purchase orders connected to that selected company display for selection in a list box on a linked form?
The list box is from a query showing all open purchase orders for all companies.
Thx for your help.

  #2  
Old May 27th, 2004, 11:20 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default display list box items per field selection on linked form

Neen,

Open the query that is the rowsource for your listbox and add a criterion in
the company field like:

Forms!FormName.ComboBoxName

(changing to the actual names) so it "reads" the selected company from your
combo box, and filters on it. Then use the Before Update event of the combo
box to requery the listbox on the other form:

Forms!LinkedFormName.ListBoxName.Requery

so it gets updated every time you change your selection on the first form.

HTH,
Nikos

"neen" wrote in message
...
Once selecting and storing a company name from a dropdown box on a form,

how can I have only the purchase orders connected to that selected company
display for selection in a list box on a linked form?
The list box is from a query showing all open purchase orders for all

companies.
Thx for your help.



  #3  
Old May 27th, 2004, 07:46 PM
neen
external usenet poster
 
Posts: n/a
Default display list box items per field selection on linked form

Trying this, but having problems.
When I enter (Forms!FormName.ComboBoxName) into the criteria of the rowsource query, it is acting like a request for a parameter when I try to use it. It isn't recognizing the name of the form.... and is asking me to input a parameter. I've double checked the form name and it's correct. When you said to add a criterion in the company field of the query, did I understand correctly....to open the query and type the form name ect. under the company field criteria?
Pls Help.
Thx.

  #4  
Old May 28th, 2004, 10:53 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default display list box items per field selection on linked form

Neen,

Yes, you did understand correctly. If you're still being asked to input a
parameter, then either you have not typed the form name or control name
correctly so it doesn't find it (make sure to enclose names in sqare
brackets if they have spaces in them, like Forms![Form Name].[Control
Name]), or the form is not open at the time the query is executed.

HTH,
Nikos


"neen" wrote in message
...
Trying this, but having problems.
When I enter (Forms!FormName.ComboBoxName) into the criteria of the

rowsource query, it is acting like a request for a parameter when I try to
use it. It isn't recognizing the name of the form.... and is asking me to
input a parameter. I've double checked the form name and it's correct.
When you said to add a criterion in the company field of the query, did I
understand correctly....to open the query and type the form name ect. under
the company field criteria?
Pls Help.
Thx.



  #5  
Old May 30th, 2004, 03:21 PM
neen
external usenet poster
 
Posts: n/a
Default display list box items per field selection on linked form

Thank you for your help.
I was never able to get the query to accept the name of the subform linked to the main form. I checked the name multiple times and it was correct, but kept asking me to input a parameter. It would accept the main form name so I worked around it for now by using a different field.

Thx again for your help. If you have any ideas why the query won't recognize the form that the list box resides on, pls let me know. It will be very useful for me in other places.
  #6  
Old May 31st, 2004, 09:55 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default display list box items per field selection on linked form

Neen,

Are you implying that the control you were trying to reference as a
criterion in your query, actually sits in a subform? In that case, the
correct reference syntax is:

Forms![Form Name]![Subform Name]![Control Name]

Did you do this?

HTH,
Nikos

"neen" wrote in message
...
Thank you for your help.
I was never able to get the query to accept the name of the subform linked

to the main form. I checked the name multiple times and it was correct, but
kept asking me to input a parameter. It would accept the main form name so
I worked around it for now by using a different field.

Thx again for your help. If you have any ideas why the query won't

recognize the form that the list box resides on, pls let me know. It will
be very useful for me in other places.


  #7  
Old June 11th, 2004, 04:30 PM
NeenDB
external usenet poster
 
Posts: n/a
Default display list box items per field selection on linked form

Just check back - I worked around this using your previous help. But, I will try this next. I tried to put the main and the sub form names in, but used a (.) instead of (!) between them. Thx again for the help.
Neen

"Nikos Yannacopoulos" wrote:

Neen,

Are you implying that the control you were trying to reference as a
criterion in your query, actually sits in a subform? In that case, the
correct reference syntax is:

Forms![Form Name]![Subform Name]![Control Name]

Did you do this?

HTH,
Nikos

"neen" wrote in message
...
Thank you for your help.
I was never able to get the query to accept the name of the subform linked

to the main form. I checked the name multiple times and it was correct, but
kept asking me to input a parameter. It would accept the main form name so
I worked around it for now by using a different field.

Thx again for your help. If you have any ideas why the query won't

recognize the form that the list box resides on, pls let me know. It will
be very useful for me in other places.



  #8  
Old June 14th, 2004, 08:05 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default display list box items per field selection on linked form

Glad to help. Post back if you need.

"NeenDB" wrote in message
...
Just check back - I worked around this using your previous help. But, I

will try this next. I tried to put the main and the sub form names in, but
used a (.) instead of (!) between them. Thx again for the help.
Neen

"Nikos Yannacopoulos" wrote:

Neen,

Are you implying that the control you were trying to reference as a
criterion in your query, actually sits in a subform? In that case, the
correct reference syntax is:

Forms![Form Name]![Subform Name]![Control Name]

Did you do this?

HTH,
Nikos

"neen" wrote in message
...
Thank you for your help.
I was never able to get the query to accept the name of the subform

linked
to the main form. I checked the name multiple times and it was correct,

but
kept asking me to input a parameter. It would accept the main form name

so
I worked around it for now by using a different field.

Thx again for your help. If you have any ideas why the query won't

recognize the form that the list box resides on, pls let me know. It

will
be very useful for me in other places.





 




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 08:02 AM.


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