openargs in sorting and grouping

S

Sarah

I have the following in my sorting and grouping in a report:

=IIf([OpenArgs]="CSW",[CSW Page],[SWNS Page])

When I run the report I receive an Enter Parameter Value for Openargs. Why
doesn't it recognize the Openargs?

As always, thanks for your help.

Sarah
 
S

strive4peace

Hi Sarah,

What do you want to do with [CSW Page] and [SWNS Page]??
Access doesn't know and neither do I.

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 
M

Marshall Barton

Sarah said:
I have the following in my sorting and grouping in a report:

=IIf([OpenArgs]="CSW",[CSW Page],[SWNS Page])

When I run the report I receive an Enter Parameter Value for Openargs. Why
doesn't it recognize the Openargs?


Text box control source expressions and calculated fields in
a query are processed by the Expression Service, not VBA.
THere is a lot of commonality, but there are some
differences.

The way to get the effect that would provide, if it worked,
is to Set the sorting and grouping field the SWNS Page
field. Then use VBA in the report's Open event procedure to
change it if needed:

If Me.OpenArgs="CSW" Then
Me.GroupLevel(0).ControlSource = "CSW Page"
End If
 
S

Sarah

Exactly what I needed. Thanks!

Allen Browne said:
Use the Open event of the report to set the Control Source of the Group
Level

Details in:
Sorting Records in a Report at run-time
at:
http://allenbrowne.com/ser-33.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Sarah said:
I have the following in my sorting and grouping in a report:

=IIf([OpenArgs]="CSW",[CSW Page],[SWNS Page])

When I run the report I receive an Enter Parameter Value for Openargs.
Why
doesn't it recognize the Openargs?

As always, thanks for your help.

Sarah
 
S

Sarah

Thanks for you quick response. Allen Brown directed me to his website for
the answer.

Thanks.

strive4peace said:
Hi Sarah,

What do you want to do with [CSW Page] and [SWNS Page]??
Access doesn't know and neither do I.

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com


I have the following in my sorting and grouping in a report:

=IIf([OpenArgs]="CSW",[CSW Page],[SWNS Page])

When I run the report I receive an Enter Parameter Value for Openargs. Why
doesn't it recognize the Openargs?

As always, thanks for your help.

Sarah
 

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