This is probably going to be very easy...
Background:
I have a database that I calculate commissions on. All the commissions are in one big data file, the employee numbers indicate whether it is "regular" or "excess" commission. For one company, this was easy, if it was regular, it began with an 11 (11*), if excess the number began with AT (AT*).
I created two fields in the query -RegComm, that shows a value if number is 11, 0 if not. Same for a field called ExComm - if the number was AT, value, 0 if not. This way I could break out the regular and excess.
Problem:
I'm now working on a company that has two prefixes for exces (GL and MN) and also numerous employee number prefixes.
I simply can't even get working the equation for the excess to compute when looking for "GL*" or "MN*".
I can get it to work for either singly, but when I put the OR in there it just reports everything.
Here's the expression:
-------
ExCom$: IIf([employee number] Like "GL*" Or "MN* ",[Com Amount],0)
-----------
I'm also going to use this for the regular comm, since there are numerous numbers not standard, and just swap the t/f placement.
Such a simple thing...do I need to do a complete compound IIF?
Background:
I have a database that I calculate commissions on. All the commissions are in one big data file, the employee numbers indicate whether it is "regular" or "excess" commission. For one company, this was easy, if it was regular, it began with an 11 (11*), if excess the number began with AT (AT*).
I created two fields in the query -RegComm, that shows a value if number is 11, 0 if not. Same for a field called ExComm - if the number was AT, value, 0 if not. This way I could break out the regular and excess.
Problem:
I'm now working on a company that has two prefixes for exces (GL and MN) and also numerous employee number prefixes.
I simply can't even get working the equation for the excess to compute when looking for "GL*" or "MN*".
I can get it to work for either singly, but when I put the OR in there it just reports everything.
Here's the expression:
-------
ExCom$: IIf([employee number] Like "GL*" Or "MN* ",[Com Amount],0)
-----------
I'm also going to use this for the regular comm, since there are numerous numbers not standard, and just swap the t/f placement.
Such a simple thing...do I need to do a complete compound IIF?