The way I built this database, an advertiser has only a single record in the AD HISTORY table for any specific Run Number of the magazine. The Run Number field contains that information. If an advertiser has more than one ad in the issue, the Ad History record for that Run Number will have multiple line items contained within the record.
The "report" is actually a page of small ads that will appear in the back of a magazine. You helped me with the FINDS related to this problem back in June in THIS THREAD. That part of the script now works perfectly, thank you very much!
The "ad" (report) contains basic contact information for each advertiser in the Run Number selected (Name, Address, Phone, and Web URL) along with a calculation field (MAGADPAGE) in the Advertiser Table that says, "See Our Ad on Page nn."
It is that "page nn" that is giving me the problem. As the script is set now, the page of ads will properly display a page number in the MAGADPAGE field, however the page number displayed is from the FIRST (oldest) related record in the AD HISTORY table. I want it to display the data from the ONE record in the AD HISTORY table that matches the $$RunNumber variable. That is what I cannot figure out how to do.
Here is the script:
It is line 4, right after the first "Loop" command, where the problem is. Everything else in this script works OK.