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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On iterate event ?? 1

Status
Not open for further replies.

strantheman

Programmer
Mar 12, 2001
333
US
My report contains multiple results. I want to perform a command after each result is displayed, row by row. Is there somewhere I can put a command like this?

Example...
Row 1: myList = myList & "," & newItem
Row 2: myList = myList & "," & newItem
Row 3: myList = myList & "," & newItem

At the end id have a list.

Can anyone suggest somewhere to start? Thanks in advance, i plan to use this for all sorts of things.
 
From what you provided, it sounds like you need to put that code in the Detail section's On Format event.

You do not need to specify row. Access will perform the concatenation on each record as it is formatted for display/print.

Is this what you need? Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Ok im working with that right now. Im stuck on trying to declare a variable outside of the detail section. I want to create a string named myList = "," but I dont know where to declare it so that it will only run once.
 
If you need that value available throughout the report module, declare it in the General Declarations sections (very top of form with Option Compare and Option Explicit).

Using myList as a module level variable will mean that each record following the first one will contain all of the information added from each preceding record. Is that what you want to do?


Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Thanks Larry!

Yes that did it, I just couldnt see the forest for the trees. Im still new to workin in the code view, but it makes much more sense now.

Everything is working great. I eventually used this technique to make a thumbnail report displaying each rows specific thumbnail using external images. I had to use the .picture property in code view and just didnt know where to put it.

thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top