Reply
 
Thread Tools Display Modes
  #1   Report Post  
Andy
 
Posts: n/a
Default 888 Word Merge String Criteria

Hi;

Using Albert Kallal's Word Merge code to merge 2 qrys, (Estimate &
Purchase). It works perfectly. Thank You Albert.

Need some help with using String Criteria.

Here is the process:
In either the Estimate or Purchase form; the user clicks a command button
that opens a second form that uses the specific qry as it's control source.
On that second form is a command button that triggers the code for the Word
merge.

What I need to learn is how to use a String Criteria to display only the
current record from the first form in the controls of the second form.

EG: If displaying Customer15 in the first form want to see only Customer15
displayed in the second form. Currently the second form displays all of the
records.

Have tried this and it doesn't work.
If Me.Dirty Then Me.Refresh
Dim strCriteria As String
strCriteria = "[PurchaseNo]='" & Forms!frmPurchase!txtPurchaseNo & "'"

DoCmd.OpenForm "frmWordMerge", , strCriteria

Is the above scenario the best answer or is there a better one that I
haven't discovered yet?

Does anyone have the answer to this question and would You be kind enough to
share it?

Thank You.


  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi Andy,

Again, you want to address this question to an Access group. It has nothing to
do with Word's MailMerge feature, but with coding in the Access environment.

Using Albert Kallal's Word Merge code to merge 2 qrys, (Estimate &
Purchase). It works perfectly. Thank You Albert.

Need some help with using String Criteria.

Here is the process:
In either the Estimate or Purchase form; the user clicks a command button
that opens a second form that uses the specific qry as it's control source.
On that second form is a command button that triggers the code for the Word
merge.

What I need to learn is how to use a String Criteria to display only the
current record from the first form in the controls of the second form.

EG: If displaying Customer15 in the first form want to see only Customer15
displayed in the second form. Currently the second form displays all of the
records.

Have tried this and it doesn't work.
If Me.Dirty Then Me.Refresh
Dim strCriteria As String
strCriteria = "[PurchaseNo]='" & Forms!frmPurchase!txtPurchaseNo & "'"

DoCmd.OpenForm "frmWordMerge", , strCriteria

Is the above scenario the best answer or is there a better one that I
haven't discovered yet?


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Word 2003 documents to WordPerfect formate Carol Microsoft Word Help 6 March 9th 06 07:11 AM
Does Word have Keyboard Merges like Word Perfect does? Donnas Mailmerge 1 June 28th 05 09:30 PM
Word2000 letterhead merge BAW Mailmerge 3 June 25th 05 01:17 PM
In Word, how can I see all files (*.*) in "save as"? citizen53 New Users 8 April 4th 05 04:56 PM
Is there a Fast Search in Word? [email protected] New Users 14 February 11th 05 08:43 PM


All times are GMT +1. The time now is 05:35 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"