Yes, it was confusing.
TotalTax value comes from database as well - to the RecordSource, so I'm not sure how to do that :
TotalTax = ntz([GSTAmount],0) + ntz([PSTAmount],0) + ntz([HSTAmount],0) + ntz([NSHAmount],0)
Do I need another recordsource?
Thanks
N.
User Profile
Collapse
-
thanks for your reply, jkmyoung
i tried it, but guess have some issues with joining the tables. Is it the right way to do so?
...Code:Me.RecordSource = "SELECT JobOrder.*, temp_shiptype.type AS ShipText, temp_packtype.type AS PackText, ntz([GSTAmount]) + ntz([PSTAmount]) + ntz([HSTAmount]) + ntz([NSHAmount])as TotalTax, Store.City, Store.PostalCode, Store.StoreName, Int(ReturnMax([weight],[dimweight])+1) AS BillWeight,
Leave a comment:
-
How is it possible to rewrite this code and make it shorter
Hello,
I have an application, which i need to modify, 1 line is really long, so when I add additional condition to it, the program gives an error. I was looking for options to re write it and make it shorter:
...Code:Me.RecordSource = "SELECT JobOrder.*, IIf([ShipType]=""1"",""ground"",IIf([ShipType]=""2"",""air"")) AS ShipText, IIf([PackType]=""1"",""skid(s)"",IIf([packtype]=""2"",""carton""))
Last edited by Niheel; Aug 5 '10, 07:47 PM.
No activity results to display
Show More
Leave a comment: