Passing data from a form to report field

G

Guest

I made a form that passes data from a popup to the report so I don't have to
make duplicate pages.

The form name is "Chooser"
The variable name is "Type"

If I hard code the value from the form like this it works fine:

=Sum(IIf([Product Type]="Soccer",[Volume],Null))

But when I pass the variable it doesn't. (I'm sure I'm just missing a
bracket or something)

=Sum(IIf([Product Type]="[Forms![Chooser]!Type]",[Volume],Null))

Any ideas?

-Adam
 
G

Guest

Hi Adam;

try: =Sum(IIf([Product Type]=Forms![Chooser]!Type,[Volume],Null))

I think you just over cooked it a little.

Best;

Rob.
 
G

Guest

=Sum(IIf([Product Type]="[Forms]![Chooser]![Type]",[Volume],Null))
You were just missina couple of brackets.
 
G

Guest

I'll try both of the suggestions when I get home tonight.

I appreciate the help.

-Adam

Klatuu said:
=Sum(IIf([Product Type]="[Forms]![Chooser]![Type]",[Volume],Null))
You were just missina couple of brackets.

AdamZ said:
I made a form that passes data from a popup to the report so I don't have to
make duplicate pages.

The form name is "Chooser"
The variable name is "Type"

If I hard code the value from the form like this it works fine:

=Sum(IIf([Product Type]="Soccer",[Volume],Null))

But when I pass the variable it doesn't. (I'm sure I'm just missing a
bracket or something)

=Sum(IIf([Product Type]="[Forms![Chooser]!Type]",[Volume],Null))

Any ideas?

-Adam
 
G

Guest

Here's the code that works: =Sum(IIf([Product
Type]=Forms![Chooser]!Type,[Allocated Case Volume],Null))

AdamZ said:
I'll try both of the suggestions when I get home tonight.

I appreciate the help.

-Adam

Klatuu said:
=Sum(IIf([Product Type]="[Forms]![Chooser]![Type]",[Volume],Null))
You were just missina couple of brackets.

AdamZ said:
I made a form that passes data from a popup to the report so I don't have to
make duplicate pages.

The form name is "Chooser"
The variable name is "Type"

If I hard code the value from the form like this it works fine:

=Sum(IIf([Product Type]="Soccer",[Volume],Null))

But when I pass the variable it doesn't. (I'm sure I'm just missing a
bracket or something)

=Sum(IIf([Product Type]="[Forms![Chooser]!Type]",[Volume],Null))

Any ideas?

-Adam
 

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

Top