openargs in sorting and grouping

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

Guest

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
 
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
 
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
 
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
 
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
 
Back
Top