Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-18-2018, 04:17 PM
dbrawner dbrawner is offline Mail Merge Repeat Record a certain number of times Windows 10 Mail Merge Repeat Record a certain number of times Office 2019
Novice
 
Join Date: Nov 2018
Posts: 3
dbrawner is on a distinguished road
Default Code does not move to next record after reaching count

Macropod,

Thanks for the reply,

Yes, I am running the code on a mailmerge document for labels. I confirmed the <<next record>> was not present in any label space on the document, and since I was only expecting 6 records to be returned, did not format a second page per your instructions...



I built the code from your post using a macro to convert the text to code. This successfully returned the price, label name, and sku values from the first record in my dataset but did not progress to the next record when the specified three iterations from the quantity field where reached.

Is there a way to step through the mail merge process to confirm the QTY actually set to the correct value and counts down as expected, and a next record is retrieved when QTY = 0?

Dave
Reply With Quote
  #2  
Old 11-19-2018, 02:07 AM
macropod's Avatar
macropod macropod is offline Mail Merge Repeat Record a certain number of times Windows 7 64bit Mail Merge Repeat Record a certain number of times Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,536
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by dbrawner View Post
Yes, I am running the code on a mailmerge document for labels. I confirmed the <<next record>> was not present in any label space on the document, and since I was only expecting 6 records to be returned, did not format a second page per your instructions...
There is no second page to format per my instructions. All you need do is complete the setup correctly on the first page. As advised in my original post:
Quote:
Originally Posted by macropod View Post
the field codes as depicted above need to be copied to each cell.
Did you do that?
Quote:
Originally Posted by dbrawner View Post
I built the code from your post using a macro to convert the text to code. This successfully returned the price, label name, and sku values from the first record in my dataset but did not progress to the next record when the specified three iterations from the quantity field where reached.
If the field code has been correctly reconstructed, it should do so. Try the code under Convert Text Representations of Fields to Working Fields in the Mailmerge Tips and Tricks 'Sticky' thread at the top of this forum: https://www.msofficeforums.com/mail-...ps-tricks.html
Quote:
Originally Posted by dbrawner View Post
Is there a way to step through the mail merge process to confirm the QTY actually set to the correct value and counts down as expected, and a next record is retrieved when QTY = 0?
After {SET QTY {MERGEFIELD Quantity}}, you could insert a field coded as {FILLIN "Quantity: {REF QTY}"}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 11-19-2018, 09:38 PM
dbrawner dbrawner is offline Mail Merge Repeat Record a certain number of times Windows 10 Mail Merge Repeat Record a certain number of times Office 2019
Novice
 
Join Date: Nov 2018
Posts: 3
dbrawner is on a distinguished road
Default [Solved] Code does not move to next record after reaching count

Macroprod,

Thanks so much for your patience...

I had used the referenced script to convert text to code...

I had copied the fields to each label as per your original instructions.

After a careful re-read of your tips and tricks, I double checked the data type in the Quantity field of my dataset. It was in fact a number as text. Converting that column to a number seems to have solved the issue.

Your code does in fact work as advertised, I thank you profusely for sharing it.

Now on to the matter of formatting the label and including a barcode for the SKU.


Not a request, just a musing.


Thanks again for your invaluable assistance.
Reply With Quote
Reply

Tags
mail merge



Similar Threads
Thread Thread Starter Forum Replies Last Post
Repeat formula 5 times and repeat? Jenny345 Excel 4 06-14-2013 04:37 PM
Mail Merge Repeat Record a certain number of times mail merge skips 16th record only - of 23 total. passenger Mail Merge 1 07-24-2012 04:03 PM
Mail Merge Repeat Record a certain number of times Mail merge to print each record as it is created PNGento Mail Merge 1 01-26-2012 02:00 PM
avoid duplicete record and merge the record with the existed record hemant.behere Excel 0 01-10-2012 02:53 AM
Extraneous record in Word Mail Merge aldo13 Mail Merge 0 01-23-2006 01:58 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2026 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft