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
|
|||
|
|||
Filtering based on data in another table
Can anyone help me write a code to generate a Filter by Form, obtaining the
data from a different table? My scenario is: I have a customer form (where is the filter button would be located) and a workorder form (which contains the data i need to have the customer form filter off of). We have multiple Customers in our Database where their product makes them have different customer ID's, therefore when a cust calls and referrences a PO to find the product, I need the filter to pull the customer ID from the Workorder Table where the PO resides and filter the Customer Form to that table. I have tried to write a query so the PO can be entered differently when the button is clicked, just can seem to get the filter to understand what is going on. Please let me know if this doesn't make sense and if should rephrase if I expect help, but if you can help it would be greatly appreciated!!! Thank you!! -- Amanda |
#2
|
|||
|
|||
Filtering based on data in another table
can't you use a query for your recordsource having the required elements of
the two tables? If your Cust table has the data, can you create a combo box filter and select the Combo box wizard to 'lookup values in a table or query'? "amanda_jb" wrote: Can anyone help me write a code to generate a Filter by Form, obtaining the data from a different table? My scenario is: I have a customer form (where is the filter button would be located) and a workorder form (which contains the data i need to have the customer form filter off of). We have multiple Customers in our Database where their product makes them have different customer ID's, therefore when a cust calls and referrences a PO to find the product, I need the filter to pull the customer ID from the Workorder Table where the PO resides and filter the Customer Form to that table. I have tried to write a query so the PO can be entered differently when the button is clicked, just can seem to get the filter to understand what is going on. Please let me know if this doesn't make sense and if should rephrase if I expect help, but if you can help it would be greatly appreciated!!! Thank you!! -- Amanda |
#3
|
|||
|
|||
Filtering based on data in another table
I tried that as well, but as soon as I add the workorder table, it shows each
customer multiple times per each ID which was generated in the workorder unless I make it unique, which I can't do. -- Amanda "Maarkr" wrote: can't you use a query for your recordsource having the required elements of the two tables? If your Cust table has the data, can you create a combo box filter and select the Combo box wizard to 'lookup values in a table or query'? "amanda_jb" wrote: Can anyone help me write a code to generate a Filter by Form, obtaining the data from a different table? My scenario is: I have a customer form (where is the filter button would be located) and a workorder form (which contains the data i need to have the customer form filter off of). We have multiple Customers in our Database where their product makes them have different customer ID's, therefore when a cust calls and referrences a PO to find the product, I need the filter to pull the customer ID from the Workorder Table where the PO resides and filter the Customer Form to that table. I have tried to write a query so the PO can be entered differently when the button is clicked, just can seem to get the filter to understand what is going on. Please let me know if this doesn't make sense and if should rephrase if I expect help, but if you can help it would be greatly appreciated!!! Thank you!! -- Amanda |
Thread Tools | |
Display Modes | |
|
|