473,812 Members | 3,417 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filtering on Combo Box in Subform

4 New Member
Hi

I am currently attempting to build a databse for a clothing company. The price can differ for this company depending on the size so in the products table I have the sizes listed in a subform linked by ProductID.

The issue is when creating the invoice - on the Sales line items I have the productID pulling through the description for the products table followed by the SIZEID which I am trying to filter down depending on the selection made ProductID. On the combo box query I have the productID criteria based on the selection of ProducID however it is returning no results.

When I remove that criteria I am getting the every size listed in the table which obviously is not satisfactory.

Can anyone help me get round this issue.

Cheers
Sep 28 '07 #1
1 1224
Scott Price
1,384 Recognized Expert Top Contributor
Without knowing what the structure of your tables is:

Normally you will have three tables here. There exists a many to many relationship between Products and Sizes, since one Product can have many Sizes, and conversely one Size may be associated with many Products. So you will have:

tblProducts
ProductID Autonumber PK
ProductName
ProductDesc

tblSizes
SizeID Autonumber PK
Size

tblProductSizes
ProductSizeID Autonumber PK
ProductID Number FK
SizeID Number FK
Price Currency

Now you should find it easier to pull your query that relates Products, Sizes and Prices... Something like
Expand|Select|Wrap|Line Numbers
  1. SELECT tblProductSizes.ProductID, tblProductSizes.SizeID, tblProductSizes.Price, tblProduct.ProductName tblProduct.ProductDesc FROM tblProducts INNER JOIN tblProducts ON tblProducts.ProductID = tblProductSizes.ProductID WHERE tblProduct.ProductID = [SomeValue]
Regards,
Scott
Oct 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
11109
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...
1
2216
by: Alex | last post by:
Acc97. I have a form which within a subform records machine down time. I have a total of 8 machines. (1-2-3 ect.) What I have been doing is using a combo box linked to the record table to select, the reasons based upon generic terms. The problem is that I have so many records now, that it takes more time looking and picking out the correct fault reason than it does completing the rest of the form!
1
1955
by: Aravind | last post by:
Hi folks. My database project has the following: -------------------------------------------------------------------------------- tables: Member: MemName, MemNo , MemType, CourseFaculty History: contains all of the above queries:
0
2024
by: Jason | last post by:
I have a primary form which is used to enter/edit data in a table named Test_Results. On this primary form there is a subform which displays site addresses. This subform is linked to the primary form by field named TestID. The subform is used just for displaying site address data, data which is stored in another table named Total_Site_Address. In the Total_Site_Address table there are numerous fields that form the site addresses...
1
2297
by: MLH | last post by:
I have a form with a subform control on it listing records returned by a saved query named UnbilledVehicles. I would like to put command buttons on the main form to apply dynamic filters to the records displayed in the subform control. Say, for instance, to list only 2004 model cars. I'm seeking the simplest approach. The main form is frmCreateInvoice, the subform control is named frmCreateInvoiceSubFormCtl and the actual sub- form is...
3
1556
by: Rick | last post by:
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...
6
3686
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
3
2052
by: kaib | last post by:
i've got 2 tables tblCompany and tblHrtasks and on the form: when i choose the company name, the subform gives the details of employee attached to that company; but there is a combo box in the subform for choosing the employee and i want a filter on the combo (on the subform) so that it displays only employees those are attached to the company (based on the selection before from the master form) following is the code in the afterupdate of...
8
1290
by: Michiel Rapati-Kekkonen | last post by:
Hi, I would like that my subform is immediately filtered as soon as one types a letter in an unbound searchbox in the form. If one types an 's' the content of the subform shows only records starting with s If one continues with 'e' the subform would show the ones starting with se. If one would correct that to 'e' by going back and removing the 's' the records would start with an e.
5
4907
by: samdev | last post by:
I have created two combo boxes in a subform.... For example 1. Combo Box State 2. Combo Box City 3. When a state from the Combo Box State is selected, the City combo box updates to reflect the State chosen by only showing cities in that selected state. 4. When I open just the subform it works just fine but when I open the
0
9734
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
10664
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
10404
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...
1
10417
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9220
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...
1
7678
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6897
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();...
1
4357
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3881
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.