473,403 Members | 2,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Filtering on Combo Box in Subform

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 1211
Scott Price
1,384 Expert 1GB
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
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...
1
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...
1
by: Aravind | last post by:
Hi folks. My database project has the following: -------------------------------------------------------------------------------- tables: Member: MemName, MemNo , MemType, CourseFaculty...
0
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...
1
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...
3
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...
6
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
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...
8
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...
5
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...
0
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...
0
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,...
0
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...

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.