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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|