ik heb een bestaande pass-trough query in access. ik wil hier een criteriavariabele aan toevoegen. de pass-trough query is erg groot waardoor ik problemen krijg als hij deze in een vba string omzet. kan ik een pass-trough query die erg groot is aanpassen met qrydef zodanig dat er een where criteria wordt toegevoegd?
Code:
SELECT [PoRecordUid]
,[PoRoType]
,[PoDn]
,[PoCustomerUid]
,[PoCustomerPo]
,[PoDirections]
,[PoPriceTerm]
,[PoPaymenntTerm]
,[PoOrderType]
,[PoShipWay]
,[PoLabelType]
,[PoTotalItem]
,[PoTotalPcs]
,[PoSqlStatus]
,[PoKboRule]
,[PoId]
,[PoNettoWeight]
,[PoWmsStatus]
,[PoCDate]
,[PoEmei]
,[PoBattery]
,[PoCommunication]
,[PoCamera]
,[PoOrderPackduration]
,[PoValue]
,[PoBlokked]
,[PoSuspiciousValue],[Line]
,[EbsLine]
,[Item]
,[Product]
,[ProductName]
,[SeriesName]
,[ModelName]
,[AfPartialQty]
,[OutQty]
,[ReaQty]
,[Allocate]
,[Org]
,[CDate]
,[EtdDate]
,[PickedUser]
,[PickedQty]
,[PickedStart]
,[PickedEnd]
,[PackedUser]
,[PackedQty]
,[PackedStart]
,[PackedEnd]
,[WH90User]
,[WH90DATE]
,[ShipoutDate]
,[ShipoutedUser]
,[KboRule]
,linevalue
,[Linepackduration]
,[ParPartnumber]
,[ParDescription]
,[ParProductGroup]
,[ParCountryOfOrigin]
,[ParWeight]
,([ParValue]/36.655) as [ParValue]
,[ParEmei]
,[ParBattery]
,[ParCommunication]
,[ParCamera]
,[ParBlokked]
,[Part_number]
,[ParShort_desc]
,[ParLong_desc]
,[ParPicture]
,[ParMemo]
,[ParCreator_Asus_ID]
,[ParCreate_date]
,[ParUpdate_Asus_ID]
,[ParUpdate_date]
,[ParProduct_group]
,[ParPack_group]
,[ParProd_code]
,[ParProduct_type]
,[ParUnit_price_NTD]
,[ParBU_name]
,[ParLife_cycle]
,[ParLast_order_date]
,[ParCountry_of_Origin]
,[ParManufacturer]
,[ParTrade_Mark]
,[ParNetto_Weight_Grams]
,[ParPacktime]
FROM [LMD_Process_Control].[dbo].[tblPO]
inner join LMD_Process_Control.dbo.tblPoDetails
on [PoRecordUid]=RecordOutUid
inner join LMD_Process_Control.dbo.tblParts
on [ParPartnumber]=Item
order by Line
where PoRecordUid = ' & [COLOR="#FF0000"]variabele [/COLOR]& '