Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-13-2013, 10:22 PM
sorengg sorengg is offline Having Problems with Multiple Keys Windows 8 Having Problems with Multiple Keys Office 2013
Novice
Having Problems with Multiple Keys
 
Join Date: Mar 2013
Posts: 3
sorengg is on a distinguished road
Default Having Problems with Multiple Keys

I have downloaded your catalogue zip file and using that. I am having an issue that I just can resolve. The key1 condition check won't work regardless of what I do. The base code always repeated printing the Key1 value even when it didn't change. I tried to change to only print if Key1 changed and not also if Key2 changed. For whatever reason the Key1 check won't work. I have attached my data, template and template output. I am not worrying about the output format, just trying to get the correct data first. I have structured the template so that I can see the mailmerge sections and have added output to show values as it is running. I have struggled with this for days and I am ready to throw my hands up. Any help would be greatly appreciated.



Greg S.
Reply With Quote
  #2  
Old 03-14-2013, 01:19 AM
macropod's Avatar
macropod macropod is offline Having Problems with Multiple Keys Windows 7 64bit Having Problems with Multiple Keys Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
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

Hi sorreng,

It seems you've mixed up your key usage. Try the attached.

PS: You also appear to be using a superseded version of the tutorial
Attached Files
File Type: docx LienWaiver.docx (14.8 KB, 14 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-14-2013, 10:21 AM
sorengg sorengg is offline Having Problems with Multiple Keys Windows 8 Having Problems with Multiple Keys Office 2013
Novice
Having Problems with Multiple Keys
 
Join Date: Mar 2013
Posts: 3
sorengg is on a distinguished road
Default

Barring the poor formatting on my working document, the output without that is identical to what your example shows. The problem is that when the LienWaiverGrp is the same and the paymentnumber changes, the LienWaiverGrp heading still prints. I only want the LienWaiverGrp to print when it actually changes. The first example of this is "0001 CDWCOR Check" There are 2 checks for this vendor. I only want the vendor info printed once on the first check, not once for each change in check.

Reply With Quote
  #4  
Old 03-14-2013, 01:59 PM
macropod's Avatar
macropod macropod is offline Having Problems with Multiple Keys Windows 7 64bit Having Problems with Multiple Keys Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
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 sorengg View Post
I only want the vendor info printed once on the first check, not once for each change in check.
In that case, why are you using two keys?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 03-14-2013, 08:36 PM
sorengg sorengg is offline Having Problems with Multiple Keys Windows 8 Having Problems with Multiple Keys Office 2013
Novice
Having Problems with Multiple Keys
 
Join Date: Mar 2013
Posts: 3
sorengg is on a distinguished road
Default

I want page breaks for every LienWaiverGrp change and print the vendor information as a header. Then print payment information (#, date, amount) and then print the invoices that are paid by the payment. A vendor can have 1 to N payments, a check can have 1 to N invoices. I don't want to print repeating header information per break levels 1 and 2 more than once.
Reply With Quote
  #6  
Old 03-14-2013, 10:06 PM
macropod's Avatar
macropod macropod is offline Having Problems with Multiple Keys Windows 7 64bit Having Problems with Multiple Keys Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
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

In that case, I'd suggest using the VendID field, rather than the LienWaiverGrp field for the key. I suspect the issue you're having is that your key string lengths are too long and Word ends up comparing only the numeric portions they start with. In this regard, I note that your VendID records only ever change when the LienWaiverGrp records change.

And, if you use the 'Inserting Content Before the Repeated Data' example from the tutorial, you still need only one key.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Having Problems with Multiple Keys Office access keys eNGiNe Word 1 11-29-2012 02:40 AM
Question about license keys ldrki Office 3 04-19-2012 04:19 PM
C, V, and H keys not working in new message jtpryan Outlook 0 06-30-2011 03:22 AM
cant use shortcut keys (ctrl+c/v/z...) laro Office 0 10-08-2010 11:01 PM
Can't Assign Shortcut Keys Vicki F. Word 0 04-17-2010 03:03 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:49 PM.


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