Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Passing a value from Access to Word

0 views
Skip to first unread message

Kathy Webster

unread,
Nov 9, 2007, 4:32:42 PM11/9/07
to
Can I store a variable in access (variable x), then write a word macro that
says "if variable x = "blue" then type "blue"?

If I can, please know that I don't even know how to store a variable in
Access, so I will really need help.

Thanks,
Kathy


Tom van Stiphout

unread,
Nov 10, 2007, 12:57:27 AM11/10/07
to
On Fri, 9 Nov 2007 13:32:42 -0800, "Kathy Webster"
<slic...@yahoo.com> wrote:

This is probably beyond what could be expected of a rookie.

The details of the solution depend so much about the details of your
exact situation that a generic solution is hard to give.
Perhaps a public property in the Access application will do.
Perhaps it is simpler to store this "variable" in the db, and write an
expression in Word.
Is this a mailmerge situation, or what?

If you need professional assistance, "Microsoft Solution Provider" in
your yellow pages may be a good place to start.

-Tom.

Kathy Webster

unread,
Nov 10, 2007, 6:17:15 PM11/10/07
to
I have an unbound combo box field in a form, which we will call
[forms]![colorselection]![color]. The user will select either "pink" or
"blue" in this unbound combo box.

I already have vb code that opens word and runs a macro. The same macro
will, and should, execute, regardless of the contents of the combo box.
But...
If the user has selected "pink", I want a certain IF statement in the word
macro to execute.
If the user has selected "blue", I want a different IF statement in the word
macro to execute.

So I believe I need to pass the value from that combo box to the word macro,
and I figure the way to do that is through variables.

Can anyone help?
Thank you,
Kathy

"Tom van Stiphout" <no.spam...@cox.net> wrote in message
news:qphaj3deogmr15n5i...@4ax.com...

Kathy Webster

unread,
Nov 13, 2007, 11:30:21 AM11/13/07
to
Anyone? :-)

"Kathy Webster" <slic...@yahoo.com> wrote in message
news:47363c00$0$25167$4c36...@roadrunner.com...

0 new messages