Hi.
Yes, we can automate.
First, you are calling the VBS file to add the numbers, yes?
Either way, select forms, and create a new form. Do not use the wizard, just design view.
When the forms comes up, right click anywhere, and select properties. A properties thingie will come up. Now, select the edit menu, and find "Select Form" which will make the properties window show the properties for the form.
Now, in properties, select the "Events" tab.
Under events, find "On Open" and select it. Two buttons will appear to the right, one with "...". Hit that one, and a new thing will appear. Select Code Builder. You will see something like
Option Compare Database
Private Sub Form_Open(Cancel As Integer)
End Sub
Your curser will be just above "End Sub"
There, type the following
DoCmd.TransferText acExportDelim, , "QueryName", "C:\YourFile.CSV"
Replace "QueryName" with what ever you named your query. Include the quotes of course. Also, C:\YourFile.CSV needs to change to what ever you want it to be.
OK, now save your form, and give it a name. Something like "Main"
Now, select tools -> Startup. On the right hand side, near the top, it asks for a form to load at startup. Use the drop down to select the form you just created, and you should be set.
Also, if you like, after the docmd.transfertext line, if you add Quit, it will exit Access after the file is created.
Let me know how it goes. Sorry for the long post, but wanted to be as clear as I could.
Thanks,
ChaZ
There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.