SOLVED found what i need in Access 2007 VBA Bible sample files
Hi
I want to use a database to create& record word document filenames. The idea is that everyone creating a document would have to do it from the database to force the use of correct filenames - which doesn't happen now. Our rules are that files have a 2 or 3 letter preset customer reference, a 3 digit code to represent the type of document such as 500 for bills, 200 for sales letters and so on, and a sequential number by customer reference. This is a legacy naming system changing it would be messy. So, document names look like ABC_500_001.doc, JB_500_001.doc. We have never needed more than 50 or so documents for any one customer, so 999 is more than enough.
i'd pictured an unbound form with combo boxes to choose the customer ref and document-type ref. Prob a command button to run the code to create the new filename as the primary key of next record in the documents table and open a form showing the new record, for remaining fields to be completed manually. Then another button on the documents form to click to create and open a new word document with that filename.
i have been lent a VB book and think I can see how to do string manipulation to make the filename form the combo box data and existing records in the table, but not how to get the result into a new record in a table. i don't even know if the final bit - starting a new word document with the right filename - is doable.
if anyone can comment on faesibility or point me to tutorials, i'd really appreciate it. I don't want to spend a long time getting partway there just to find out I'm trying to do something that is not possible without being an expert.
Hi
I want to use a database to create& record word document filenames. The idea is that everyone creating a document would have to do it from the database to force the use of correct filenames - which doesn't happen now. Our rules are that files have a 2 or 3 letter preset customer reference, a 3 digit code to represent the type of document such as 500 for bills, 200 for sales letters and so on, and a sequential number by customer reference. This is a legacy naming system changing it would be messy. So, document names look like ABC_500_001.doc, JB_500_001.doc. We have never needed more than 50 or so documents for any one customer, so 999 is more than enough.
i'd pictured an unbound form with combo boxes to choose the customer ref and document-type ref. Prob a command button to run the code to create the new filename as the primary key of next record in the documents table and open a form showing the new record, for remaining fields to be completed manually. Then another button on the documents form to click to create and open a new word document with that filename.
i have been lent a VB book and think I can see how to do string manipulation to make the filename form the combo box data and existing records in the table, but not how to get the result into a new record in a table. i don't even know if the final bit - starting a new word document with the right filename - is doable.
if anyone can comment on faesibility or point me to tutorials, i'd really appreciate it. I don't want to spend a long time getting partway there just to find out I'm trying to do something that is not possible without being an expert.
Last edited: