Passing data from a form to report field

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Hi Adam;

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

I think you just over cooked it a little.

Best;

Rob.
 
=Sum(IIf([Product Type]="[Forms]![Chooser]![Type]",[Volume],Null))
You were just missina couple of brackets.
 
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
 
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
 
Back
Top