RandomNeeds
Registered User.
- Local time
- Today, 17:11
- Joined
- Sep 3, 2010
- Messages
- 18
Hi,
I am trying to create an append query and one of my field needs is quite complex.
When I run this, I get prompted to enter the parameter for NEWKEYSHIP. What I expect should happen, since I am running this on an order that is using that Key Order Type, that the output should include the value from "New key Number" in the "SW Key" Field.
It is not understanding that I am trying to interrogate the KeyOrderType field value.
Sw key: IIf([tbl_OrderForm.KeyOrderType]=[“NEWKEYSHIP”],[tbl_OrderForm.NewKeyNumber],IIf([tbl_OrderFormDetailsNew.PartNumber] Like "H40*",IIf([tbl_OrderForm.AlohaKey]>0 And [tbl_OrderForm.NewKeyNumber] Is Null,[tbl_OrderForm.AlohaKey],IIf([tbl_OrderForm.NewKeyNumber]>0,[tbl_OrderForm.NewKeyNumber],''))))
The latter part of they query works exactly as advertised. IIf([tbl_OrderFormDetailsNew.PartNumber] Like "H40*",IIf([tbl_OrderForm.AlohaKey]>0 And [tbl_OrderForm.NewKeyNumber] Is Null,[tbl_OrderForm.AlohaKey],IIf([tbl_OrderForm.NewKeyNumber]>0,[tbl_OrderForm.NewKeyNumber],''))))
My goal is to add in the extra parameter of checking the KeyOrderType.
I am trying to create an append query and one of my field needs is quite complex.
When I run this, I get prompted to enter the parameter for NEWKEYSHIP. What I expect should happen, since I am running this on an order that is using that Key Order Type, that the output should include the value from "New key Number" in the "SW Key" Field.
It is not understanding that I am trying to interrogate the KeyOrderType field value.
Sw key: IIf([tbl_OrderForm.KeyOrderType]=[“NEWKEYSHIP”],[tbl_OrderForm.NewKeyNumber],IIf([tbl_OrderFormDetailsNew.PartNumber] Like "H40*",IIf([tbl_OrderForm.AlohaKey]>0 And [tbl_OrderForm.NewKeyNumber] Is Null,[tbl_OrderForm.AlohaKey],IIf([tbl_OrderForm.NewKeyNumber]>0,[tbl_OrderForm.NewKeyNumber],''))))
The latter part of they query works exactly as advertised. IIf([tbl_OrderFormDetailsNew.PartNumber] Like "H40*",IIf([tbl_OrderForm.AlohaKey]>0 And [tbl_OrderForm.NewKeyNumber] Is Null,[tbl_OrderForm.AlohaKey],IIf([tbl_OrderForm.NewKeyNumber]>0,[tbl_OrderForm.NewKeyNumber],''))))
My goal is to add in the extra parameter of checking the KeyOrderType.