The first thing that I see missing is the comma before the return column "PCategoryID".
Dan ---Choose Box--- CHOOSE vXX FROM #VALUES FOR ((CTXT(PCategoryID)) & PCategoryDesc), PCategoryID FROM ProductCategory WHERE CatID = .vHWCatID AND PCategoryID IN (SELECT PCategoryID FROM PartsList WHERE CatID = .vHWCatID AND PCategoryID &vPCatList) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Victor Timmons Sent: Thursday, July 10, 2003 11:19 AM To: RBASE-L Mailing List Subject: [RBASE-L] - popup ver choose In the code below I setup the var vPCatList to only include parts with PcatID's Codes included in the var and display the choices for the user to select from. If i use then var in a popup's where clause i get syntax error. IF I use the same where clause with the var, in a choose box's where clause no error. I don't understand why it works with the choose and not the popup ---Exit EEP in form--- --IntHw1.EEP SET VAR vPCatList TEXT = NULL IF .vHWCatID = 7 THEN --HW SET VAR vPCatList TEXT = ('IN(42,45,48,49,52,55,56,64)') ENDIF IF .vHWCatID = 8 THEN --Locks SET VAR vPCatList TEXT = ('IN(62,63,64,65,66)') ENDIF IF .vHWCatID = 14 THEN --Sill SET VAR vPCatList TEXT = ('IN(44,83)') ENDIF ---Where Clause from Popup--- WHERE CatID = .vHWCatID AND PCategoryID IN (SELECT PCategoryID FROM PartsList WHERE CatID = .vHWCatID AND PCategoryID &vPCatList) ---Choose Box--- CHOOSE vXX FROM #VALUES FOR ((CTXT(PCategoryID)) & PCategoryDesc)PCategoryID FROM ProductCategory WHERE CatID = .vHWCatID AND PCategoryID IN (SELECT PCategoryID FROM PartsList WHERE CatID = .vHWCatID AND PCategoryID &vPCatList) Victor Timmons Tiz's Door Sales, Inc 425-258-2391

