Encapsulating data

W

Wendell A. Clark

I have been using the form.checkbox to catch and display a database value
e.g.

'NU0603_ObsvdPrecautions
If Not (Trim(rsHHA.Fields("NU0603_ObsvdPrecautions").Value & "") = "") Then
For i = 1 To Len(Trim(rsHHA.Fields("NU0603_ObsvdPrecautions").Value &
"")) Step 1
xChng =
evalPoint(Trim(rsHHA.Fields("NU0603_ObsvdPrecautions").Value), (0 + i))
If xChng = 1 Then ActiveDocument.FormFields("Check" & 1019 +
i).CheckBox.Value = True Else ActiveDocument.FormFields("Check" & 1019 +
i).CheckBox.Value = False
Next i
End If


I have had the occassion to need to duplicate the checkbox sequences for
sub-data (detail) records Is their away to add the checkbox, question set
dynamically. Any assistance would be most welcome.
--
Wendell A. Clark, BS

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may
contain confidential and privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
please notify us by reply e-mail. You are hereby notified that you have
received this communication in error and that any review, disclosure,
dissemination, distribution or copying of it or its contents is prohibited.
If you have received this communication in error, please destroy all copies
of this communication and any attachments. Contact the sender if it
continues.
 
C

Cindy M -WordMVP-

Hi Wendell,

Maybe it's just because it's getting late :), but I'm not sure exactly what
you're asking. The way I read this, the actual question has nothing at all to
do with the code you show us, correct? The code is just for information?

What you want to be able to do is something along the lines of copying and
pasting some text to another part of the document? (Although not necessarily
via the clipboard.)

Or is this a standard item that you may need to insert "from scratch" on
occasion?

If the first, you need to have a way to identify what you want to duplicate.
Am I correct in understanding this is a set of paragraphs? In that case, it
may make sense to select them all and use Insert/Bookmark. Then you can, at
any time
TargetRange.FormattedText =
ActiveDocument.Bookmarks("Name").Range.FormattedText

If the second, then an AutoText entry may be what you're looking for?
I have been using the form.checkbox to catch and display a database value
e.g.

'NU0603_ObsvdPrecautions
If Not (Trim(rsHHA.Fields("NU0603_ObsvdPrecautions").Value & "") = "") Then
For i = 1 To Len(Trim(rsHHA.Fields("NU0603_ObsvdPrecautions").Value &
"")) Step 1
xChng =
evalPoint(Trim(rsHHA.Fields("NU0603_ObsvdPrecautions").Value), (0 + i))
If xChng = 1 Then ActiveDocument.FormFields("Check" & 1019 +
i).CheckBox.Value = True Else ActiveDocument.FormFields("Check" & 1019 +
i).CheckBox.Value = False
Next i
End If


I have had the occassion to need to duplicate the checkbox sequences for
sub-data (detail) records Is their away to add the checkbox, question set
dynamically. Any assistance would be most welcome.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
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 :)
 
W

Wendell A. Clark

I would like to be able to query my database return a question/answer set
where the answers are true/false and dynamically place (1..*) times on the
page as needed.

I have been hard coding the checkboxes in the past, but now the sub data
dictates a more viable solution.

Thanks for the help ;-)
 
C

Cindy M -WordMVP-

Hi Wendell,
I would like to be able to query my database return a question/answer set
where the answers are true/false and dynamically place (1..*) times on the
page as needed.

I have been hard coding the checkboxes in the past, but now the sub data
dictates a more viable solution.
So, you're looking for a way to insert formfield checkboxes into a document,
on the fly. And what's wrong with using the code you showed us in your first
message? It's "too much work" (you don't want to have to repeat all the steps
for each set of sub data)?

have you considered the AutoText suggestion I made in my first reply?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
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 :)
 
W

Wendell A. Clark, BS

Actually they are not paragraphs but different phases of a medical
assessment e.g. respiratory lung sounds - choices, breath rate choices etc
bowel vitals etc not all sections are applicable at all times not all
choices are available at all times (about 39 pages if complete -- I would
like to populate the questions/choices via check boxes dynamically/ The
data is stored by question number then a series of 1's and 0's for true
false values.

I'm just trying to streamline the process.
Thanks for the input. ;-)
 

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