473,666 Members | 2,138 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filtering Parts Orders

I have a customer order form with a subform that lists parts per
customer order that I'm updating. I'm trying to filer the parts list
per Manufacture and Model number so that the user doesn't have to
scroll through the complete list of parts to find the parts that relate
to the model in question. I've got two combo boxes on the main form
where you can select the manufacture, that filters the model combo box
to show only models from that maker, that in turn filters the combo box
in the subform to list only parts for that model.

I've got all that working well but I'm trying to decide how best to
proceed with one final step. Some of the models have parts in common
with other models. I have a table that lists manufactures which is
related to a model table by ManfID. My products table has colum for
Manufacture and colum for model number. I would like to find a way to
relate models with common parts so I don't have to enter the same part
number for each different model. In other words I don't want to have 5
of the same parts listed in the products table to relate to each
different model.

I know I probably don't need the manufacture listed in the products
table but I use that for updating pricing from different manufactures.
It would seem that I need one more table field somewhere to tie common
parts between models together but my brain seems to have locked up
trying to figure it out. I've tried rebooting it a couple times but
it's Monday here and It's slow starting up. Any help would be
appreciated

Oct 9 '06 #1
3 1548
rkc
Rick wrote:
I have a customer order form with a subform that lists parts per
customer order that I'm updating. I'm trying to filer the parts list
per Manufacture and Model number so that the user doesn't have to
scroll through the complete list of parts to find the parts that relate
to the model in question. I've got two combo boxes on the main form
where you can select the manufacture, that filters the model combo box
to show only models from that maker, that in turn filters the combo box
in the subform to list only parts for that model.

I've got all that working well but I'm trying to decide how best to
proceed with one final step. Some of the models have parts in common
with other models. I have a table that lists manufactures which is
related to a model table by ManfID. My products table has colum for
Manufacture and colum for model number. I would like to find a way to
relate models with common parts so I don't have to enter the same part
number for each different model. In other words I don't want to have 5
of the same parts listed in the products table to relate to each
different model.

I know I probably don't need the manufacture listed in the products
table but I use that for updating pricing from different manufactures.
It would seem that I need one more table field somewhere to tie common
parts between models together but my brain seems to have locked up
trying to figure it out. I've tried rebooting it a couple times but
it's Monday here and It's slow starting up. Any help would be
appreciated
It would be nice to see the table structure you're working with,
but the short answer is that you have a many to many relationship
between Models and Parts. A many to many relationship is modeled
using a junction table that references the primary keys from the
two participating tables.

ModelsParts (ModelID*, PartID*)

It sounds like you also have a many to many relationship between
Parts And Manufacturers. Same theory applies to that relationship.
ManufacturersPa rts(Manufacture rID*, PartID*, PartPrice)



Oct 9 '06 #2
rkc wrote:
It would be nice to see the table structure you're working with,
but the short answer is that you have a many to many relationship
between Models and Parts. A many to many relationship is modeled
using a junction table that references the primary keys from the
two participating tables.

ModelsParts (ModelID*, PartID*)

It sounds like you also have a many to many relationship between
Parts And Manufacturers. Same theory applies to that relationship.
ManufacturersPa rts(Manufacture rID*, PartID*, PartPrice)
Here it is;
tblProducts
ProductID
ProductName
PartNumber
UnitPrice
ManfID
ModelNum

tblManf
ManfID
ManfName

tblModel
ManfID
Model

Oct 9 '06 #3


For those interested I solved this by adding one more field to Products
table and one field to Model table. I added AssocPart to each table.
Parts that are associated to many models have no model, just a type of
AssocPart. I then added AssocPart column to my filter select combo
box, and added an OR statement to the parts order SQL to select all
parts with selected ModelNum OR AssocPart.

Oct 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2477
by: Alex Satrapa | last post by:
I have a table from which I'm trying to extract certain information. For historical reasons, we archive every action on a particular thing ('thing' is identified, funnily enough, by 'id'). So the only way to find out the current state of a particular combination of attributes is to "select distinct on (id, ...) ... order by date desc". In the examples below, I've taken real output from psql and done a global search/replace on various...
3
11097
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I have a primary form named TestResults, which is connected to data in a table named TestResults. There are basically two other tables that are related to the TestResults table (and the primary form) named Names-Normalized and SiteAddresses. The...
2
387
by: Shiva | last post by:
Hi, I wonder if it is possible to filter a subform in Access 2002. In other words, the selection criteria of the filter are defined by the fields of the subform. This doesn't seem to work. The only way I can make up to implement this, is to open a another form that works on the same table as the subform; then the filter should be applied to this form; next the foreign keys pointing to the master should be collected and be assigned to...
1
2217
by: samotek | last post by:
Filter the last date only I am trying t0 filter only the last date of the query,but i cannot manage that. My query is the following : SELECT Sum(.liters) AS SumOfLiters, orders.invoicedate FROM orders LEFT JOIN ON orders.orderid = .OrderID GROUP BY orders.invoicedate;
0
3636
by: Patrick | last post by:
I'm working on a contact management application, and need a hand with one aspect... Here's what I want to create: ------------------------------------ A form split into two parts. There is a datagrid on the left side that lists names and perhaps a couple of other key fields. The user can click on a record in the datagrid, which should automatically pull up details on that record in the various text boxes and other controls on the right...
0
1192
by: ajchan16 | last post by:
Hi, I have an issue that I just cannot figure out. I currently have an XML file that I would like to populate into a datagrid on my windows application. Now I know how to use the DataView to filter out all the rows I need, but unfortunately this does not work if the value I need to use to filter is in the parent node. Can someone help me figure out how to basically filter from a value of the parent node (Customer name attribute) then...
1
3872
by: hackerslacker | last post by:
I have an ordering form that use two combo boxes to filter down the records of a Products table. This worked fine with the after_Update of the first filtering the records and creating the rowsource of the second combo. The second combo's control source is the Product ID field (foriegn key) on the Orders table. Everything worked well until I decided to enhance the form by changing the second combo to an option group. Now I don't know...
0
1260
by: Mclaren | last post by:
Hi I have 3 tables: User, Customer and Customer order. I have a query that picks up all the orders captured for a given User. Each of the orders have a capture date. My main form is based on the Users table.
8
6400
by: Ragbrai | last post by:
Howdy All, I have a query that is used for filtering results to be used in a combo box. The query needs to test fields from both a table and then unbound text boxes on the form that also contains the combo box. The fields I am working with are date fields that are formated as Short Date. I have written an IIF statement and placed it within the Criteria section of the Date field that I am trying to filter by. The current IIF statement works...
0
8445
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.