Command Buttons

R

Richard

I created a command button on a form that links to a word
document. After I close the link a second version of the
database opens leaving me with two open databases. Why.
This only happens if I acess the link form the command
button. I open the word document and start the query it
doesn't happen
 
C

ChrisJ

Don't know why it happens, but this fixes it

dim strAppTitle as string

strAppTitle = dbs.Properties("AppTitle")
CurrentDb.Properties("AppTitle") = "Microsoft Access"
RefreshTitleBar
Call word here

and after it closes...

CurrentDb.Properties("AppTitle") = strAppTitle
RefreshTitleBar

This will need error handling around it in case
property "AppTitle" does not exist
 

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