From Word, I want to know the value an object on a form in Access. The
Database is MyDatabase, the form is myForm and the field is txtDateHigh. So
far...
Sub GetDateValue()
Dim myDatabase As Database
txtDatabase As Sring
txtDatabase = "C:\Access Reports\MyDatabase.MDB"
Set myDataBase = OpenDatabase(txtDatabase)
........
That's as far as I get. Don't know what else to Dim or Set, and could not
find this by searching kb, etc. Would appreciate a hint.
As an alternative, is there a way that the Access Code can pass a value to a
procedure in word. For example, I run a procedure with the Access code:
objWord.RunAutoMacro wdAutoOpen
Can this pass a value?
> From Word, I want to know the value an object on a form in Access. The
> Database is MyDatabase, the form is myForm and the field is txtDateHigh. So
[quoted text clipped - 8 lines]
> That's as far as I get. Don't know what else to Dim or Set, and could not
> find this by searching kb, etc. Would appreciate a hint.
Helmut Weber - 29 Nov 2005 12:13 GMT
Hi Richard,
see:
http://groups.google.de/group/microsoft.public.word.vba.general/browse_frm/threa
d/e2219e2c1e28fa85/db9d70e6ec240dae?lnk=st&q=access+group%3Amicrosoft.public.wor
d.vba*+author%3Ahelmut+author%3Aweber&rnum=1&hl=de#db9d70e6ec240dae

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
richardb - 29 Nov 2005 15:35 GMT
Guten Tag Helmut,
This is what I was looking for. I see that the "run" method allows me to
pass arguments. I was trying to use the RunAutoMacro method for wdAutoOpen,
and this did not allow for passing arguments.
The Word job is set up from a form in Access and I want one of the options
from that form sent to Word. My first thought was that Word could read the
object value from the Access form. When I couldn't figure out how to do that,
I turned to sending the value as an argument in RunAutoMacro (instead I will
now send the value as an argument with "run").
Viele danken,
Richard
> Hi Richard,
>
> see:
>
> http://groups.google.de/group/microsoft.public.word.vba.general/browse_frm/threa
d/e2219e2c1e28fa85/db9d70e6ec240dae?lnk=st&q=access+group%3Amicrosoft.public.wor
d.vba*+author%3Ahelmut+author%3Aweber&rnum=1&hl=de#db9d70e6ec240dae