Search Results For: loop

Field Inspection App In MS Access

Today, we will consider how to track field inspections, by building a framework for a field inspection app in MS Access. This sample application is just a framework, and just shares some potential ideas. You can customize it and put your own “spice” on it. Here’s what it will look like when we’re done: First […]

Continue Reading

How To Have Access Export A Table To An Excel XLSX In VBA

This was regarding a question I received from this blog: Hello, I am hoping to find some help. I have an Access DB that I use to collect data. I have a number of different reporting features. I would like to add the option for my user to export to excel. When I do this […]

Continue Reading

How To Use VBA To Extract Outlook Emails To Access Table

I use this code to extract outlook emails from a certain Outlook folder of a user (like the user’s Inbox) whenever they leave the department. This code will loop the Outlook Inbox (or other folder) of the logged in user’s Microsoft Exchange Account, and insert the body of the message into an Access table. Note: […]

Continue Reading

An Easy VBA Counter

This post is actually based on a question I received on my YouTube video: https://www.youtube.com/watch?v=l5Aj8dPH8KY&lc=z234unjqmpymudvjp04t1aokgbwgqi4nrfxkozk3u00rrk0h00410 The counter can be implemented a bit easier by using VBA. Here’s how: Sub AddCounter() Dim intCounter As Integer Dim strSQL As String Dim strSQLUpdate As String Dim rst As Recordset ‘counter is done based on the sort order ‘strSQL […]

Continue Reading

How To Find Certain Files In VBA

Someone wanted to loop through the files in over 100 directories and find a list of their powerpoint files. This code will loop a specific directory and check if a file with a “pptx” extension exists in that directory. If it does, a message box will be displayed. Instead of the message box, the file’s […]

Continue Reading

How To Attach Files In An Access Database

If you noticed Access now has a datatype to add attachments. If you don’t want to program this with VBA as I show you how to do below, you can use it (if you dare :)). I think Microsoft wanted to make things easier for the user, so they added the ability to add attachments […]

Continue Reading

How To Extract Data From Outlook To Access With VBA

In this post you are going to find out how you can extract data From Outlook to Access with VBA”. Someone at the place I’m working at was let go, and they wanted the information, primarily from the user’s Outlook inbox, to be extracted to an outside application so the particular information about various projects […]

Continue Reading

How To Have Access VBA Link Tables Programmatically

This table relinking procedure is a really good example of how to use VBA to link your tables programmatically, and how to have MS Access refresh linked tables automatically. It allows re-linking all tables to a selected drive source (the folder the backend database is in). In this example, all of the tables that need […]

Continue Reading

MS Access Running Count With String Column And Duplicates

In my previous post, https://vbahowto.com/ms-access-running-count-with-duplicates/, the DCount counter, works fine when you have a numeric value, and it works fine when you do the VBA counter when you do it on numeric column values, but what about counters on string columns with duplicates? MS Access Running Count With String Column And Duplicates Since an Access […]

Continue Reading

MS Access Running Count With Duplicates

This post is a response to a video I have on Youtube: MS Access Running Counter In Query “After running your solution in different databases, I found out that it only works if there are no duplicate values within the Number field (in your tblRunningSum). Once there are duplicate values, the row numbering gets corrupted. […]

Continue Reading