Check Boxes and Merge

S

Stephen Glynn

How do I set the query options in Merge to see whether a check box in
the datasource is checked or not? I only want to merge items I've
checked. I've tried using True, Yes, and the not blank option and
nothing seems to work.

Steve
 
D

Doug Robbins - Word MVP

Hi Stephen,

Use 0 for False and -1 for True.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
S

Stephen Glynn

Doug said:
Hi Stephen,

Use 0 for False and -1 for True.

I can't get it to work, I fear. The conditional merge works fine if a
put a text field in the data source, type in "Yes" for the records I
want and then set YesNoField = Yes in Query Options. If, however, I
use a check box and set the criterion to -1 Word 2000 tells me it can't
find any matching records. I've tried using quote marks, but nothing
seems to work.

Help, please.

Steve
 
D

Doug Robbins - Word MVP

Hi Stephen,

What is the data source? What type of checkbox is it?

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
S

Stephen Glynn

It's a Word 2000 table containing two columns. One's got the various
pieces of data in as text and the other has check boxes I've inserted
from the Forms tool bar.

As I say, if I get rid of the check boxes and just enter Y or N it works
perfectly.

If it's any help, I do know how to do something similar using a form in
Access. It's something I set up for a acupuncturist so he can record
the needle points he uses by clicking unbound checkboxes and referencing
their tag property:

Private Sub SaveSession_Click()
Const SQL_1 = "INSERT INTO tblSessionsNeedlings " & "(SessionID,
NeedlingID) VALUES ("
Dim dbD As Database
Dim strSQL As String
Dim ctlC As Control

Set dbD = CurrentDb


For Each ctlC In Me.Controls
If ctlC.ControlType = acCheckBox Then
If ctlC.Value = True Then
strSQL = SQL_1 & Me!textSessionID & ", " & ctlC.Tag & ");"
dbD.Execute strSQL, dbFailOnError
End If
End If
Next

End Sub

and then use the NeedlingID to pull out the "NeedleDescription" text
field associated with it to print a description of the points used, but
I don't know how to translate that into something I could use in Word.

Steve
 
D

Doug Robbins - Word MVP

Hi Stephen,

I would move the data into an Access table that includes a Yes/No field and
use the Table as the datasource.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top