mcclunyboy
Registered User.
- Local time
- Yesterday, 21:05
- Joined
- Sep 8, 2009
- Messages
- 292
Hi,
I am looking for some advice, best practice or guidance.
I have a form, which the users obviously enter data onto. When the data is entered the click a button which runs a macro. The macro saves the record (which produces an ID displayed on the form), then it runs a query which is output to excel and used for a mailmerge (one record only).
My issue is this - the macro runs a query, which prompts the user for the new ID, this record is output to excel blah blah blah. Unfortunately the query is then displayed on screen in datasheet view when I would rather it wasn't. I have checked the macro properties for OpenQuery and can't see anyway to hide the results - is there a way to do this?
Am I able to acheive what I want via VB if the above isn't possible?
On an even more complicated note - the user opens the document in word, selects to finish the merge and archives the document before printing - is there anyway I can grab the filename automatically to populate a field in the database (at the moment the users must manually "attach" the file (in reality I am just storing a hyperlink)?
I am looking for some advice, best practice or guidance.
I have a form, which the users obviously enter data onto. When the data is entered the click a button which runs a macro. The macro saves the record (which produces an ID displayed on the form), then it runs a query which is output to excel and used for a mailmerge (one record only).
My issue is this - the macro runs a query, which prompts the user for the new ID, this record is output to excel blah blah blah. Unfortunately the query is then displayed on screen in datasheet view when I would rather it wasn't. I have checked the macro properties for OpenQuery and can't see anyway to hide the results - is there a way to do this?
Am I able to acheive what I want via VB if the above isn't possible?
On an even more complicated note - the user opens the document in word, selects to finish the merge and archives the document before printing - is there anyway I can grab the filename automatically to populate a field in the database (at the moment the users must manually "attach" the file (in reality I am just storing a hyperlink)?