|
A.T.,
You wish to enforce variable decimal positions as
per employee type. This implies a dynamic format string, length of which
would be determined by EmpType (Employee Type).
It is suggested that you set up an auxiliary table named
T_EmpType having two fields named EmpType (primary key) and DecCount (number
type). DecCount shows the number of decimal positions needed for the
given EmpType. Populate this table with four records, pertaining to
the four employee types.
Sample query given below, using String() function for
dynamic formatting, should get you the desired results. T_EmpPay is the
name of your main table. In this table, EmpType is the foreign key. The tables
are joined on EmpType.
Best wishes,
A.D.Tejpal
====================================
SELECT T_EmpPay.*,
IIf([GrossBilling]>0,Format([ComNo]*[ComPctAmt],"#." &
String([DecCount],"0")),0) AS ComPct
FROM T_EmpPay INNER JOIN T_EmpType ON T_EmpPay.EmpType = T_EmpType.EmpType; ====================================
Please zip all files prior to uploading to Files section.
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- [AccessDevelopers] Format torres0157
- [AccessDevelopers] Re: Format jmw95823
- [AccessDevelopers] Re: Format torres0157
- [AccessDevelopers] Re: Format jmw95823
- [AccessDevelopers] Re: Format jmw95823
- Re: [AccessDevelopers] Re: Format A.D.Tejpal
- [AccessDevelopers] Re: Format torres0157
- Re: [AccessDevelopers] Re: Format A.D.Tejpal
- [AccessDevelopers] What is limitation of MS Ac... Brij
- [AccessDevelopers] Re: Format dreaux1
- [AccessDevelopers] Re: Format torres0157
