I have several users that use the same Excel template to generate quotations. Every time a user is creating a new quotation, he must get a sequential number from an Access database. That also involves entering a few fields of information into the database via a form. Basically the sequence of events (everything automated unless noted as User activity):
1. User opens the XL template and clicks a button to request the new number
2. Open AC database and open the data entry form
3. User completes all fields and clicks OK
4. Save the data in the AC table and close the database
5. Populate the quotation number cell on the XL template
6. User completes the rest of the quotation.
I can envision a couple of ways to do this...
A. All the AC activity is controlled by code in the XL VBA module. Is this possible and not really complex?
B. XL VBA code only opens the AC database (I have already learned how to do this), and on opening, an AutoRun macro + AC VBA does the rest. Can the number then be passed back to XL?
I like (A) because the AC database may be opened for other reasons, in which case I don't want any code executed. I like (B) because it seems a lot simpler and I'm more familiar with AC VBA than XL VBA. Can a variable be passed from XL to AC on opening that tells AC whether to run the code or not?
Thanks,
PD