PDA

View Full Version : Determin whats different in text



oxicottin
06-24-2019, 07:44 AM
If I had a form Form1 and on that form there were two combo boxes cbo1 and cbo2 and I selected for cbo1 (ProductID) 2 and for cbo2 I selected (ProductID) 3. Large image Is what kind of data I have.


In the smaller image it would always be two results. The items in the second row "cbo2" that are circled are the ones I want to display in my report. How do I do this?

OBP
06-25-2019, 01:41 AM
Sorry, can you explain the difference between number 3 in image 1 and number 3 in image 2?
As I can't see the difference that you are looking for.
When you say that you want to display the values in circles in a report, is it just those values?

oxicottin
06-25-2019, 03:44 AM
I have two combo boxes my your form. Eachcombo box lets you choose a product. After choosing two products, I want todynamically create a query that will show only those columns where the twoproducts have different results and/or hide those columns that have the samevalues for the two selected products BUT I only want to show the results fromto "To" combo box not the "From" combo box as shown withthe green circles.

What im trying to do is show whatcomponents are needed to switch over to another product, kind of like a partslist but the reason I want to hide those columns that have the same values forthe two selected products is they are already installed so I don't need thosecomponents.

Here is a query that gets me the results a shown in the small image.


SELECT tbl_Product.ProductID, tbl_Product.Product, tbl_Components.Steel, tbl_Components.Paper, tbl_Components.CutOffBlades, tbl_Components.FeedWheel, tbl_Components.FinalForm, tbl_Components.LastPass, tbl_Components.Straightner, tbl_Components.FingerStation, tbl_Components.GlueHead, tbl_Components.OilerWheel, tbl_Components.PinprickLowerPlate
FROM (tbl_Product INNER JOIN tbl_Components ON tbl_Product.ProductID = tbl_Components.ProductID) INNER JOIN tbl_SetUp ON tbl_Product.ProductID = tbl_SetUp.Product
WHERE (((tbl_Product.ProductID) Between [Forms]![frm_Switchboard].[cboComingFrom] And [Forms]![frm_Switchboard].[cboGoingTo]));

OBP
06-25-2019, 01:35 PM
It is quite possible to write some VBA to generate a queryDef for use with a report, I will attach an example of creating a queryDef.
What I can't work out at the moment is how you arrive at the decision of what records to include.
Or is it just the one record?

oxicottin
06-26-2019, 11:20 AM
It is quite possible to write some VBA to generate a queryDef for use with a report, I will attach an example of creating a queryDef.
What I can't work out at the moment is how you arrive at the decision of what records to include.
Or is it just the one record?


Thank you that gave me some ideas....Thank you