Sometimes when developing automation with VBA in Access, it is important to return results from a SQL query string. For simplicity, all examples have been written as Functions. Please feel free to modify as needed. Recordset Selection in VBA | Select One Record There are many reasons why a developer would want to return only one result, for instance a count query. Here is an … [Read more...] about Access 2010, 2013 VBA Run SQL Return Results
How to Display SQL Query Data with Listbox in Access 2010 with VBA
Sometimes I like to use the listbox control in Access to display information. Partially because I like the look of it and partially because it offers up a better user experience. You will note that the title references Access 2010 where my screenshots see were taken in 2013. I use 2010 on my work computer and 2013 on personal development PC. This works on both. For this … [Read more...] about How to Display SQL Query Data with Listbox in Access 2010 with VBA
Crack Microsoft Word Password Free
So you recently took over a project and as the new lead you need to change some content in a key process document. After you open the document, you find out that it is read only and protected by a password from the last guy who is no longer there... What??? Anyway, I realize that there are a number of reasons why you need to break read-only protection on a word doc. … [Read more...] about Crack Microsoft Word Password Free
Select or Open a file in VBA with file dialog | Access VBA
In a recent project, I was tasked with designing a program in Access where an end user could import a spreadsheet, run a sub routine in VBA and export the results. As part of the user experience, I wanted the end user to be able to select the input spreadsheet with the file dialog tool. UPDATE 05/22/2015: The function below contains an error handler and works well if your … [Read more...] about Select or Open a file in VBA with file dialog | Access VBA
How to Count Records in VBA | Microsoft Access 2010
In a recent program that I wrote, I needed to store a count of records from a query in a variable. Since VBA and Access isn't as intuitive as say connecting to a MySQL database with PHP, I thought I would share. Function recordCount() Dim rs As DAO.Recordset Dim db As Database Dim strSQL As String Set db = CurrentDb 'Count Query - replace query with your … [Read more...] about How to Count Records in VBA | Microsoft Access 2010