Wrong syntax

B

bill

Can anyone help, by telling me the correct syntax to
use. The syntax below is causing an error message

Study Number is a text field in the query qrySelectFPI
and
txtjob1 is a textbox on form frmFPIselect

=Sum(Abs([FPI]=5)) where "[qrySelectFRI]![Study Number]"
= "[forms]![frmFRISelect]![txtjob1]"

Just having problems with the exact syntax

Any help is greatly appreciated
 
J

John Vinson

Can anyone help, by telling me the correct syntax to
use. The syntax below is causing an error message

Study Number is a text field in the query qrySelectFPI
and
txtjob1 is a textbox on form frmFPIselect

=Sum(Abs([FPI]=5)) where "[qrySelectFRI]![Study Number]"
= "[forms]![frmFRISelect]![txtjob1]"

Just having problems with the exact syntax

Any help is greatly appreciated

Since I have no clue what you're trying to do, and the syntax is not
recognizable as part of anything I can recognize, I'm afraid I can't
help. What is the context? Where are you putting this expression, and
what do you want it to accomplish?
 
B

bill

Sorry about that. This is going in the control source of
a text box on a report. It is one of many similar text
boxes on the report. What I am doing is running a query
based on user input of up to 5 project numbers. I want
to run a report that counts the number of "5" values in a
field for the first job #, then counts the number of 5
values for the second job #, etc. The report will look
something like:

Job #1 Job #2 Job #3 etc.
(5) 100 (5) 75 (5) 33
(4) 87 (4) 22 (4) 18
(3) 22 (3) 11 (3) 12

etc, etc.
-----Original Message-----
Can anyone help, by telling me the correct syntax to
use. The syntax below is causing an error message

Study Number is a text field in the query qrySelectFPI
and
txtjob1 is a textbox on form frmFPIselect

=Sum(Abs([FPI]=5)) where "[qrySelectFRI]![Study Number]"
= "[forms]![frmFRISelect]![txtjob1]"

Just having problems with the exact syntax

Any help is greatly appreciated

Since I have no clue what you're trying to do, and the syntax is not
recognizable as part of anything I can recognize, I'm afraid I can't
help. What is the context? Where are you putting this expression, and
what do you want it to accomplish?


.
 
J

John Vinson

Sorry about that. This is going in the control source of
a text box on a report. It is one of many similar text
boxes on the report. What I am doing is running a query
based on user input of up to 5 project numbers. I want
to run a report that counts the number of "5" values in a
field for the first job #, then counts the number of 5
values for the second job #, etc. The report will look
something like:

Job #1 Job #2 Job #3 etc.
(5) 100 (5) 75 (5) 33
(4) 87 (4) 22 (4) 18
(3) 22 (3) 11 (3) 12

I'd suggest a Crosstab query, using a criterion on the project number
like

[ProjectNumber] = [Enter project 1:]
OR [ProjectNumber] = [Enter project 2:]
OR [ProjectNumber] = [Enter project 3:]
OR [ProjectNumber] = [Enter project 4:]
OR [ProjectNumber] = [Enter project 5:]

Then set the Job# to be the Column Header and the Project Number(which
I'm guessing is your (5) (4) etc.) as the Row Header, and use Count as
the crosstab operator.

The IIF syntax is going to be a major pain in the neck!
 

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

Similar Threads

Correct Syntax 1
IIF Statement 1
Corrected Syntax 3
Syntax Error 4
Access Dcount (multiple criteria) 3
Correct Syntax 25
I Believe this should work but its not. 11
WHAT IS WRONG WITH THIS CODE? 9

Top