wind54surfer
Registered User.
- Local time
- Today, 14:55
- Joined
- Jan 19, 2005
- Messages
- 31
Hi everyone,
I am a newbie of sorts and in need of help.
When I open a form in A2010 I get the error, but it works flawless in A2003 (is an mdb). In debug I found the problem in 2 lines (--->)
I can't figure out what is wrong, I searched the net to no avail, nothing similar to my problem.
This is the code (On Current):
Case 1
--->'Me!txtActualComm = IIf([Total Perform] = 0, 0, (((AllTotalQry.Form!PerfTot * 0.8 * 0.85 / [txtGST]) * 0.1) + ([PriceSold] / [txtGST]) - (AllTotalQry.Form!PerfTot * 0.8 * 0.85 / [txtGST])) - (Nz(AllTotalQry.Form!NoComTot) / [txtGST] * 0.8 * 0.85 * 0.1))
Me!txtOption = "Performance"
--->'Me!txtProjEarn = (IIf([chkbkCondo] = (-1), ([PriceSold] / [txtGST]) - (IIf([Total Perform] = 0, (0), ([Total Cost Query subform].Form!PerfCostTotal + [Total Cost Query subform].Form!InstCostTotal + (Nz([ExtrasEst]))))), ([PriceSold] / [txtGST]) - (IIf([Total Perform] = 0, (0), ([Total Cost Query subform].Form!PerfCostTotal + [Total Cost Query subform].Form!InstCostTotal + [txtActualComm] + (Nz([ExtrasEst])))))))
Me!txtPerfPercent.Visible = True
Me!txtCNCPercent.Visible = False
Me!txtValPercent.Visible = False
Case 2
Me!txtActualComm = IIf([Perform CNC] = 0, 0, (([Perform CNC] * 0.8 / [txtGST] * 0.85) * 0.05) + ([PriceSold] / [txtGST]) - ([Perform CNC] * 0.8 / [txtGST] * 0.85))
Me!txtOption = "Perform CNC"
Me!txtProjEarn = (IIf([chkbkCondo] = (-1), ([PriceSold] / [txtGST]) - (IIf([Perform CNC] = 0, (0), ([Total Cost Query subform].Form!PerfCostTotal))), ([PriceSold] / [txtGST]) - (IIf([Perform CNC] = 0, (0), ([Total Cost Query subform].Form!PerfCostTotal + [txtActualComm])))))
Me!txtCNCPercent.Visible = True
Me!txtPerfPercent.Visible = False
Me!txtValPercent.Visible = False
Case 3
Me!txtActualComm = IIf([Value Total] = 0, 0, (((AllTotalQry.Form!ValueTot * 0.8 * 0.85 / [txtGST]) * 0.08) + ([PriceSold] / [txtGST]) - (AllTotalQry.Form!ValueTot * 0.8 * 0.85 / [txtGST])) - (Nz(AllTotalQry.Form!NoComTot) / [txtGST] * 0.8 * 0.85 * 0.08))
Me!txtOption = "Value"
Me!txtProjEarn = (IIf([chkbkCondo] = (-1), ([PriceSold] / [txtGST]) - (IIf([Value Total] = 0, (0), ([Total Cost Query subform].Form!ValCostTotal + [Total Cost Query subform].Form!InstCostTotal + (Nz([ExtrasEst]))))), ([PriceSold] / [txtGST]) - (IIf([Value Total] = 0, (0), ([Total Cost Query subform].Form!ValCostTotal + [Total Cost Query subform].Form!InstCostTotal + [txtActualComm] + (Nz([ExtrasEst])))))))
Me!txtValPercent.Visible = True
Me!txtPerfPercent.Visible = False
Me!txtCNCPercent.Visible = False
Case 4
Me!txtActualComm = IIf([Value CNC] = 0, 0, (([Value CNC] * 0.8 / [txtGST] * 0.85) * 0.05) + ([PriceSold] / [txtGST]) - ([Value CNC] * 0.8 / [txtGST] * 0.85))
Me!txtOption = "Value CNC"
Me!txtProjEarn = (IIf([chkbkCondo] = (-1), ([PriceSold] / [txtGST]) - (IIf([Value CNC] = 0, (0), ([Total Cost Query subform].Form!ValCostTotal))), ([PriceSold] / [txtGST]) - (IIf([Value CNC] = 0, (0), ([Total Cost Query subform].Form!ValCostTotal + [txtActualComm])))))
Me!txtCNCPercent.Visible = True
Me!txtPerfPercent.Visible = False
Me!txtValPercent.Visible = False
==============================================
Any help is greatly appreciated.
I am a newbie of sorts and in need of help.
When I open a form in A2010 I get the error, but it works flawless in A2003 (is an mdb). In debug I found the problem in 2 lines (--->)
I can't figure out what is wrong, I searched the net to no avail, nothing similar to my problem.
This is the code (On Current):
Case 1
--->'Me!txtActualComm = IIf([Total Perform] = 0, 0, (((AllTotalQry.Form!PerfTot * 0.8 * 0.85 / [txtGST]) * 0.1) + ([PriceSold] / [txtGST]) - (AllTotalQry.Form!PerfTot * 0.8 * 0.85 / [txtGST])) - (Nz(AllTotalQry.Form!NoComTot) / [txtGST] * 0.8 * 0.85 * 0.1))
Me!txtOption = "Performance"
--->'Me!txtProjEarn = (IIf([chkbkCondo] = (-1), ([PriceSold] / [txtGST]) - (IIf([Total Perform] = 0, (0), ([Total Cost Query subform].Form!PerfCostTotal + [Total Cost Query subform].Form!InstCostTotal + (Nz([ExtrasEst]))))), ([PriceSold] / [txtGST]) - (IIf([Total Perform] = 0, (0), ([Total Cost Query subform].Form!PerfCostTotal + [Total Cost Query subform].Form!InstCostTotal + [txtActualComm] + (Nz([ExtrasEst])))))))
Me!txtPerfPercent.Visible = True
Me!txtCNCPercent.Visible = False
Me!txtValPercent.Visible = False
Case 2
Me!txtActualComm = IIf([Perform CNC] = 0, 0, (([Perform CNC] * 0.8 / [txtGST] * 0.85) * 0.05) + ([PriceSold] / [txtGST]) - ([Perform CNC] * 0.8 / [txtGST] * 0.85))
Me!txtOption = "Perform CNC"
Me!txtProjEarn = (IIf([chkbkCondo] = (-1), ([PriceSold] / [txtGST]) - (IIf([Perform CNC] = 0, (0), ([Total Cost Query subform].Form!PerfCostTotal))), ([PriceSold] / [txtGST]) - (IIf([Perform CNC] = 0, (0), ([Total Cost Query subform].Form!PerfCostTotal + [txtActualComm])))))
Me!txtCNCPercent.Visible = True
Me!txtPerfPercent.Visible = False
Me!txtValPercent.Visible = False
Case 3
Me!txtActualComm = IIf([Value Total] = 0, 0, (((AllTotalQry.Form!ValueTot * 0.8 * 0.85 / [txtGST]) * 0.08) + ([PriceSold] / [txtGST]) - (AllTotalQry.Form!ValueTot * 0.8 * 0.85 / [txtGST])) - (Nz(AllTotalQry.Form!NoComTot) / [txtGST] * 0.8 * 0.85 * 0.08))
Me!txtOption = "Value"
Me!txtProjEarn = (IIf([chkbkCondo] = (-1), ([PriceSold] / [txtGST]) - (IIf([Value Total] = 0, (0), ([Total Cost Query subform].Form!ValCostTotal + [Total Cost Query subform].Form!InstCostTotal + (Nz([ExtrasEst]))))), ([PriceSold] / [txtGST]) - (IIf([Value Total] = 0, (0), ([Total Cost Query subform].Form!ValCostTotal + [Total Cost Query subform].Form!InstCostTotal + [txtActualComm] + (Nz([ExtrasEst])))))))
Me!txtValPercent.Visible = True
Me!txtPerfPercent.Visible = False
Me!txtCNCPercent.Visible = False
Case 4
Me!txtActualComm = IIf([Value CNC] = 0, 0, (([Value CNC] * 0.8 / [txtGST] * 0.85) * 0.05) + ([PriceSold] / [txtGST]) - ([Value CNC] * 0.8 / [txtGST] * 0.85))
Me!txtOption = "Value CNC"
Me!txtProjEarn = (IIf([chkbkCondo] = (-1), ([PriceSold] / [txtGST]) - (IIf([Value CNC] = 0, (0), ([Total Cost Query subform].Form!ValCostTotal))), ([PriceSold] / [txtGST]) - (IIf([Value CNC] = 0, (0), ([Total Cost Query subform].Form!ValCostTotal + [txtActualComm])))))
Me!txtCNCPercent.Visible = True
Me!txtPerfPercent.Visible = False
Me!txtValPercent.Visible = False
==============================================
Any help is greatly appreciated.
Last edited: