PDA

Click to See Complete Forum and Search --> : access, word and headaches...


L-Plate
Aug 15th, 2000, 12:49 PM
OK, long and comlicated....

basically I'm trying to mailmerge a current record to word. I have a query that finds the current record from the key on the form but when i try to mailmerge it word starts a new session of access and then, no surprise, the query prompts for the form field....

any idea how to get word to use the current session, or any other way of fixing it?

it occoured to me that i could get the windows userid with an API call and write it vs the table key value in another table... then the key number could be picked up in without the form open... but i think the chances of getting the query to pick up the userid are... well... slim...

any idea?

gwdash
Aug 16th, 2000, 03:32 PM
to get the userid use GetUserName. I don't know how to help on your other issues, sorry :(

Sash
Dec 19th, 2000, 10:24 AM
I'm having the same problem, Access opening twice - but is there a way of getting around opendatasource? Were you able to solve it? If so please reply.

Dec 19th, 2000, 10:33 AM
I think you guys both need to use "getobject" from vba - trapping the error that is caused by no such object existing as this grabs an instance of an already open database?


(create a new object in that case (I think it might be error 429 - could be wrong)