Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter Fields Allow Multiple Values

Status
Not open for further replies.

RachelK

Programmer
Mar 18, 2002
171
GB
I have created a Parameter called {?Office} I have ticked the box allow multiple values.

I would like to put the parameter field in the report footer however when I drag the parameter field it just shows the fist office selected not the list of offices selected any idea's.
 
Hi,
I am not sure if I understand your question, but it seems like you want to have a "recap" of all the offices selected appear in the report footer. Is this correct? If so, this should be quite easy.
1) In the report General Declarations section, add a string datatype to keep the offices found:
Dim strOfficeList as string
Dim intCount as integer 'format first office
2) In report open event, initialize intCount to 0
3) In the detail section, enter this code into the OnFormat event:
' this code will check intCount. If it is the 1st
' record, then place the office name into strOfficeList
' THEREAFTER, add formatting
If intCount = 0 Then
strOfficeList = txtOffice
intCount = 1
else
strOfficeList = strOfficeList & ", " & txtOffice
End If
4) Add a text box (perhaps called "txtOffices"???) to the report footer (to display office names). In your OnFormat event for the report footer, add this code:
txtOffices = strOfficeList

Make sense? HTH, [pc2]
Randy Smith
California Teachers Association
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top