I have two scripts that work,
FIRST SCRIPT:
Is on a form (FORM1) with just a listbox. It will look in a location for all files and then list them inside the listbox on the open event of the form.
SECOND SCRIPT:
Looks for bookmarks within a template document and inserts fields. This is located on a continuous list form (FORM2) and it inserts the fields for the assiated record to were the button is clicked.
What I want:
On the continuous list form when the button is pressed I want it to open the form with the listbox to select which template to use. Right now its only one template and it's defined in the code.
Maybe ive been doing too much VBA today so i cant think properly, I just cant get this working inside my head (once I have the idea im sure ill be able to figure it out for myself.)
One way I could do it, when I click the command button on form one that I want to select I could have it open FORM 2 (with the listbox of templates) with the record information on this new form also.
It seems a messy way of doing it.
Maybe, refer to form 1 in the code after the template is selected... I'd be worried about an accidental focus change by the user on form one.
Note: It's a theory question and I want to know how I should approach such a problem.