Passing a value from Access to Word

  • Thread starter Thread starter Kathy Webster
  • Start date Start date
K

Kathy Webster

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
 
On Fri, 9 Nov 2007 13:32:42 -0800, "Kathy Webster"

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.
 
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
 
Anyone? :-)

Kathy Webster said:
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 said:
On Fri, 9 Nov 2007 13:32:42 -0800, "Kathy Webster"

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.
 
Back
Top