View Single Post
  #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.