Pick from Combo

  • Thread starter Thread starter DS
  • Start date Start date
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top