Hi Sean,
I have been busy with this problem since last, and think I have found some answers, but not all.
First, I am using the macro facilitiy in Word97. The SQLSelect statement doesn't seem to accept any parameters. But, I have found the following in the help file:
Set myMMData = ActiveDocument.MailMerge.DataSource
If myMMData.FindRecord(Find Text:="Peter",Field:="Name") = True Then
numRecord = myMMData.ActiveRecord
End If
By inserting this code after the SQL, I get the record that I want. That I get the record also when I replace the "True" keyword with "False", except that the numRecord of course will not be set. But, since I don't know what to do with the record number anyway, that is'nt imporant. I have however another wuestion now: When I have found the record that I want, and it has been inserted into a Word document, I also want to check the contents of another field in the record, to decide further action to take. How do I do that?
Rolf
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement