Look up the Dcount function in Acccess Help. Assuming your record source is a table or query you should be able to use it to find the number of records. Maq
<insert witty signature here>
What I'm trying to do is to control the mail merge.
I'm using the NEXT mergefield to show more than one record on a page, but I want to do a NEXTIF and only move onto the next record if the last record hasn't already been reached.
As it is, I am just using NEXT but I am dealing with small (varying) numbers of records. There are some fields that share the same data with all the other records, and then some fields with unique data for each record.
Essentially, there is a section in the middle of the merge doc that I need to show the unique data for each record, followed by a section at the bottom that shows the shared data. But the NEXT fields above that seem to move past the last record, and then all the shared fields come up as blank.
Well, it's starting to sound like you're coding in MS-Word, not Access. Have you tried posting the question in one of the Word forums? They may be able to help more than I could.
Perhaps you can use recordset.EOF to check for EOF before moving on to the next record. Maq
<insert witty signature here>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.