I have a word document with a checkbox on it. How do I "read" the state of that checkbox in Access 2K3?
I already have the form open and I can read BOOKMARKS just fine. But when I try to read the Checkbox, All I get is something like this "[]".
Here is snippet of my code.
The top part works fine. First and last populate on my Access form.
The area contained in the "****" is my failed attempt at passing the checkbox state to my Access form.
I don't like the Word Combo Box (it looks terrible) so that isn't an option and the "Web Control" Combo box trips the Macro Warning, so I don't want to use that either.
The BEST way for me to accomplish what I need is with a Checkbox on the Word form and read the state of that box from Access.
Thanx!
Joe
I already have the form open and I can read BOOKMARKS just fine. But when I try to read the Checkbox, All I get is something like this "[]".
Here is snippet of my code.
Code:
Set objword = CreateObject("word.application")
With objword
objword.Visible = False
objword.Documents.Open (ContactForm)
objword.ActiveDocument.Bookmarks("first").Select
Me!first = objword.Selection.Text
objword.ActiveDocument.Bookmarks("last").Select
Me!last = objword.Selection.Text
' *******************************************
objword.ActiveDocument.Bookmarks("RBLRecommendedY").Select
RBLRecommendedY = objword.Selection.Value
objword.ActiveDocument.Bookmarks("RBLRecommendedN").Select
RBLRecommendedN = objword.Selection.Value
If RBLRecommendedY = True Then
Me!RBLRecommended = "Yes"
End If
If RBLRecommendedN = True Then
Me!RBLRecommended = "No"
End If
'*************************************************
End With
objword.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
objword.Quit
Else
DoCmd.Close acForm, "ContactInfoImportfrm"
Exit Sub
End If
The top part works fine. First and last populate on my Access form.
The area contained in the "****" is my failed attempt at passing the checkbox state to my Access form.
I don't like the Word Combo Box (it looks terrible) so that isn't an option and the "Web Control" Combo box trips the Macro Warning, so I don't want to use that either.
The BEST way for me to accomplish what I need is with a Checkbox on the Word form and read the state of that box from Access.
Thanx!
Joe