Pick from Combo

D

DS

I have two combo boxes. The first one is from a Value List...
"Main Item";"Modifier"

The second on is from SQL based on a Table

SELECT ReportCats.ReportCatID, ReportCats.ReportCat, ReportCats.ReportType
FROM ReportCats
WHERE (((ReportCats.ReportType)=IIf([Forms]![NewItems]![ItemType]="Main
Item","Main Items","Modifiers")));


I have this IIf statement...the first half works but not the second. I
can only get the Main Items, no Modifiers. Any help appreciated.
Thanks
DS
 
T

Tony

My first thought is that you are referencing the ItemType wrong. You have to
reference the column number (not the title) that contains Main Items and
Modifiers.

-Tony
 
D

DS

Tony said:
My first thought is that you are referencing the ItemType wrong. You have to
reference the column number (not the title) that contains Main Items and
Modifiers.

-Tony

:

I have two combo boxes. The first one is from a Value List...
"Main Item";"Modifier"

The second on is from SQL based on a Table

SELECT ReportCats.ReportCatID, ReportCats.ReportCat, ReportCats.ReportType
FROM ReportCats
WHERE (((ReportCats.ReportType)=IIf([Forms]![NewItems]![ItemType]="Main
Item","Main Items","Modifiers")));


I have this IIf statement...the first half works but not the second. I
can only get the Main Items, no Modifiers. Any help appreciated.
Thanks
DS
Thanks Tony, Once again making it more complicated than it should be! I
only need to put this in the criteria of the second combo box...
Forms!NewItem!ItemType

Then added this code on the after update...
Me.ReportID = Null
Me.ReportID.Requery
Me.ReportID = Me.ReportID.ItemData(0)

Works like a Champ!!
Thanks
DS
 
Top