Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dependent Combo Boxes Question 2

Status
Not open for further replies.

smille777

Technical User
Joined
Jun 27, 2004
Messages
43
Location
US
Hi everybody.

I have tried reading through the relative posts, but am not nearly experienced enough to figure this out:

I have a "Vendor Quotes" Form which contain two Combo Boxes: 1) Customer 2) MFR Part Number

The Combo boxes are based on the following tables with a 1 to many relationship:

"Customer Requiremsnts" and Customer Requirement Details"

Relative fields for "Customer Requirements" are:

[Customer Req ID], [Customer]

Relative fields for "Customer Requirement Details" are:

[Customer Requirement Details ID], [Customer Req ID], [MFR Part Number], [Manufacturer]

I want to select [Customer] from Combo Box 1 and bring bring up [MFR Part Number] in Combo Box 2, based on [Customer]

I know I probaly made this long and drawn out, I appreciate your help everyone!!!

Scott


 
This because you have set your Bound Column for this combo equal to 2. The second column is the field [Manufacture] according to your Select statement. The Bound Column should be changed to 1 which is the part number.

Also, I noticed that you are setting the combo back to null in the AfterUpdate event procedure. You don't want to do that if your combo is bound to the part number field. You want it to pass the Bound column value to this field. Remove that line of code.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
It is DONE! I took a step away from the computer for awhile and when I came back I Saw what I had done.

Thank you SO MUCH!!!!

Scott
 
Good luck, Scott. Thanks for the Star.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Bob I have one more question for my future reference:

In the following Code for cboMFR Part Number

SELECT A.[MFR Part Number], A.Manufacturer, A.[Qty Requested], A.Target FROM [Customer Req Details] AS A WHERE A.[Customer Req ID]=FORMS![Vendor Quotes]!Customer ORDER BY A.[MFR Part Number], A.Manufacturer, A.[Qty Requested], A.Target;

How would I expand on this code (or rewrite it) to include
[Date] FIELD from [Customer Reqs] TABLE and also include it in the ORDER BY?

ON MY WORD THIS WILL BE MY LAST QUESTION FOR YOU AND I WILL LEAVE YOU ALONE!!!!!!!!!!

THANKS AGAIN AND YOU DESERVE SEVERAL STARS
 
I think you are talking about the table Customer Req Details:


Code:
SELECT A.[MFR Part Number], A.Manufacturer, A.[Qty Requested], A.Target. A.[Date] FROM [Customer Req Details] AS A WHERE A.[Customer Req ID]=FORMS![Vendor Quotes]!Customer ORDER BY A.[MFR Part Number], A.Manufacturer, A.[Qty Requested], A.Target, A.[Date];

Now I don't know where you want it displayed. I just tacked it on the end of the columns and included it at the end of the Order By clause. Post back if this needs to be adjusted.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Well,

I do want the information displayed in the cboMFR Part Number on the Vendor Quotes FORM.

But, essentially I am wanting to retrieve data from TWO tables, to be listed in cboMFR Part Number:

[Date] comes from TABLE [Customer Reqs]

While

[MFR Part Number], [Manufacturer], [Quantity Requested], and [Target] ALL come from TABLE [Customer Req Details].

Thanks Bob!



 
Something like this ?
SELECT A.[MFR Part Number], A.Manufacturer, A.[Qty Requested], A.Target, B.[Date] FROM [Customer Req Details] AS A INNER JOIN [Customer Reqs] AS B ON A.[Customer Req ID]=B.[Customer Req ID] WHERE A.[Customer Req ID]=FORMS![Vendor Quotes]!Customer ORDER BY A.[MFR Part Number], A.Manufacturer, A.[Qty Requested], A.Target, B.[Date];

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That's the one!

Many thanks to PH (Who has helped me before and now again and to Bob, for tolerating 22+ posts. You are a warrior!

I can now move past this form and take my new knowledge forward!

Thanks again!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top