Expression Troubles

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I inherited the following expression, which is supposed to assign a minimum
fee of $25 to all customers in Project 10 and a mimimum fee of $75 to all
customers in any other Project (1,2,3,4,5,6,7,8,9,11 etc). What it is
actually doing is only bringing back the 10 customers and none other. It is
not assigning $25 either, but $0.

Why is this only bringing back the 10s? And why isn't it assigning a fee?
Thank you for any help.

MgmtFee1:
IIf(dbo_grp_project!IND_PRJ="10",IIf([MgmtFee]<=25,[MgmtFee]=25,[MgmtFee]),IIf([MgmtFee]<=75,[MgmtFee]=75,[MgmtFee]))
 
I am confused by the dbo_grp_project!IND_PRJ

I could understand if it were
Forms!dbo_grp_project!IND_PRJ or
dbo_grp_project.IND_PRJ

Other than that, I don't see anything
 
you're not the only one who is confused, but "dbo_grp_project" is just the
name of a table.

S.Clark said:
I am confused by the dbo_grp_project!IND_PRJ

I could understand if it were
Forms!dbo_grp_project!IND_PRJ or
dbo_grp_project.IND_PRJ

Other than that, I don't see anything

--
Steve Clark,
Former Access MVP
FMS, Inc
http://www.fmsinc.com/consulting



Novice2000 said:
Hi,

I inherited the following expression, which is supposed to assign a minimum
fee of $25 to all customers in Project 10 and a mimimum fee of $75 to all
customers in any other Project (1,2,3,4,5,6,7,8,9,11 etc). What it is
actually doing is only bringing back the 10 customers and none other. It is
not assigning $25 either, but $0.

Why is this only bringing back the 10s? And why isn't it assigning a fee?
Thank you for any help.

MgmtFee1:
IIf(dbo_grp_project!IND_PRJ="10",IIf([MgmtFee]<=25,[MgmtFee]=25,[MgmtFee]),IIf([MgmtFee]<=75,[MgmtFee]=75,[MgmtFee]))
 
I assume you are using this in a query. If my recommendation below doesn't
work, can you post the entire SQL string for us?

First off, you cannot set [MgmtFee] = 25 inside the IIF ( ) function. This
function returns a value, but does not allow to assign values in the True or
False portion of the function. I've added line wraps to make it more legible.

I think it should read:

MgmtFee1: IIf(dbo_grp_project!IND_PRJ="10",_
IIf([MgmtFee]<25,25,[MgmtFee]),_
IIf([MgmtFee]<75,75,[MgmtFee]))

HTH
Dale
--
Email address is not valid.
Please reply to newsgroup only.


Novice2000 said:
you're not the only one who is confused, but "dbo_grp_project" is just the
name of a table.

S.Clark said:
I am confused by the dbo_grp_project!IND_PRJ

I could understand if it were
Forms!dbo_grp_project!IND_PRJ or
dbo_grp_project.IND_PRJ

Other than that, I don't see anything

--
Steve Clark,
Former Access MVP
FMS, Inc
http://www.fmsinc.com/consulting



Novice2000 said:
Hi,

I inherited the following expression, which is supposed to assign a minimum
fee of $25 to all customers in Project 10 and a mimimum fee of $75 to all
customers in any other Project (1,2,3,4,5,6,7,8,9,11 etc). What it is
actually doing is only bringing back the 10 customers and none other. It is
not assigning $25 either, but $0.

Why is this only bringing back the 10s? And why isn't it assigning a fee?
Thank you for any help.

MgmtFee1:
IIf(dbo_grp_project!IND_PRJ="10",IIf([MgmtFee]<=25,[MgmtFee]=25,[MgmtFee]),IIf([MgmtFee]<=75,[MgmtFee]=75,[MgmtFee]))
 
I used this and it does assign $25 to anything under $25, but it doesn't
bring back anything but the "10" customers, so I can't tell if it would
correct the other customers to a minimum $75. Could it be that the expression
is restricting the query to 10?

Dale Fye said:
I assume you are using this in a query. If my recommendation below doesn't
work, can you post the entire SQL string for us?

First off, you cannot set [MgmtFee] = 25 inside the IIF ( ) function. This
function returns a value, but does not allow to assign values in the True or
False portion of the function. I've added line wraps to make it more legible.

I think it should read:

MgmtFee1: IIf(dbo_grp_project!IND_PRJ="10",_
IIf([MgmtFee]<25,25,[MgmtFee]),_
IIf([MgmtFee]<75,75,[MgmtFee]))

HTH
Dale
--
Email address is not valid.
Please reply to newsgroup only.


Novice2000 said:
you're not the only one who is confused, but "dbo_grp_project" is just the
name of a table.

S.Clark said:
I am confused by the dbo_grp_project!IND_PRJ

I could understand if it were
Forms!dbo_grp_project!IND_PRJ or
dbo_grp_project.IND_PRJ

Other than that, I don't see anything

--
Steve Clark,
Former Access MVP
FMS, Inc
http://www.fmsinc.com/consulting



:

Hi,

I inherited the following expression, which is supposed to assign a minimum
fee of $25 to all customers in Project 10 and a mimimum fee of $75 to all
customers in any other Project (1,2,3,4,5,6,7,8,9,11 etc). What it is
actually doing is only bringing back the 10 customers and none other. It is
not assigning $25 either, but $0.

Why is this only bringing back the 10s? And why isn't it assigning a fee?
Thank you for any help.

MgmtFee1:
IIf(dbo_grp_project!IND_PRJ="10",IIf([MgmtFee]<=25,[MgmtFee]=25,[MgmtFee]),IIf([MgmtFee]<=75,[MgmtFee]=75,[MgmtFee]))
 
not this expression. Post the rest of your SQL string and we might be able
to figure out what is filtering out your other values.

--
Email address is not valid.
Please reply to newsgroup only.


Novice2000 said:
I used this and it does assign $25 to anything under $25, but it doesn't
bring back anything but the "10" customers, so I can't tell if it would
correct the other customers to a minimum $75. Could it be that the expression
is restricting the query to 10?

Dale Fye said:
I assume you are using this in a query. If my recommendation below doesn't
work, can you post the entire SQL string for us?

First off, you cannot set [MgmtFee] = 25 inside the IIF ( ) function. This
function returns a value, but does not allow to assign values in the True or
False portion of the function. I've added line wraps to make it more legible.

I think it should read:

MgmtFee1: IIf(dbo_grp_project!IND_PRJ="10",_
IIf([MgmtFee]<25,25,[MgmtFee]),_
IIf([MgmtFee]<75,75,[MgmtFee]))

HTH
Dale
--
Email address is not valid.
Please reply to newsgroup only.


Novice2000 said:
you're not the only one who is confused, but "dbo_grp_project" is just the
name of a table.

:

I am confused by the dbo_grp_project!IND_PRJ

I could understand if it were
Forms!dbo_grp_project!IND_PRJ or
dbo_grp_project.IND_PRJ

Other than that, I don't see anything

--
Steve Clark,
Former Access MVP
FMS, Inc
http://www.fmsinc.com/consulting



:

Hi,

I inherited the following expression, which is supposed to assign a minimum
fee of $25 to all customers in Project 10 and a mimimum fee of $75 to all
customers in any other Project (1,2,3,4,5,6,7,8,9,11 etc). What it is
actually doing is only bringing back the 10 customers and none other. It is
not assigning $25 either, but $0.

Why is this only bringing back the 10s? And why isn't it assigning a fee?
Thank you for any help.

MgmtFee1:
IIf(dbo_grp_project!IND_PRJ="10",IIf([MgmtFee]<=25,[MgmtFee]=25,[MgmtFee]),IIf([MgmtFee]<=75,[MgmtFee]=75,[MgmtFee]))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top