I'll have to make a smaller file before I can zip and load. Mine's pretty hefty right now. And I think I'll have to do it tomorrow as I have to leave the office in a few minutes. Sorry for the delay when you are willing to help now.
Meanwhile, a quick question, would you put the function in a field in the table that the layout is based on or put the function in a field somewhere else? I have it in my table of globals, which has one record. This works great for displaying what I want to display in the portals, by the way. I just can't get a count of the portal rows. The only time I get an answer other than "?" is when I pick the original data table and not one of the table occurences of the same data. They're both linked to global through the same IDNumber field.