It has been a long time since I have added a VBA post, so here is something that I had to quickly put together for a little project that I am working on this evening. I have a really large table with a bunch of fieldnames that I need to query through to make some sample data for another project. I thought that it would be easiest to quickly grab all of the field names from … [Read more...] about Get Column Names From Access Database Table with VBA
Microsoft Access
Calculate Business Days in VBA Without Table
Recently, I was working on a side project that did some cool things with business days. In one of the use cases, I needed to figure out the date five business days from the current date. My solution needed to be built for technical staff to easily modify exclusion dates. My solution also had to be something that could be set once and forgotten as the end-user pool is expected … [Read more...] about Calculate Business Days in VBA Without Table
Reset Autonumber Field in Access Without Recreating Table
This is going to be a very short and sweet (and saweeeet!!! that you don't have to delete) post. Have you ever wanted to reset the counter on a autonumber field in Access, but don't want to delete the table and start over again? SQL Magic to the rescue! Before running the SQL statement below, you should understand that by re-numbering an index, you will lose access to data in … [Read more...] about Reset Autonumber Field in Access Without Recreating Table
Automatic Mail Merge With VBA and Access
I once built a program with MS Access that handled a mail merge job of ~1000 letters per week. It used a very simple word template. For input, every Friday, I pulled data from a production SQL database which I saved to an Excel spreadsheet. I built an import function that loaded the Excel data into table in my MS Access tool. The program ran a mail merge process for all … [Read more...] about Automatic Mail Merge With VBA and Access
Send Email Through Outlook with VBA
I have to say that I have been super hesitant to share this example as it could be used by spammers. That being said, there are plenty of legit uses for sending email through Outlook with VBA. I have used this function primarily to automate the delivery of scheduled reports where I pull in an HTML template (fancy), replace template "placeholders" and have the report sent to a … [Read more...] about Send Email Through Outlook with VBA