VBA Do Loop

How To Restart A VBA Loop Counter

This is related to an interesting question I received from an individual, and this processing example may help someone. Basically we are conducting a 10 day clinical study on a group of patients. We want to store the results of the finding in a database and reset the study counter when a result comes back […]

Continue Reading

How To Exit A VBA Loop

Hi, there are times when you need to exit a loop after a certain condition has been met. How do you exit function in VBA? In the following example, you are going to see how to exit a function in VBA:

How do you stop loop in VBA? In the following example you’ll discover […]

Continue Reading

Here Is An Example Of The VBA Trim Function

The “Trim” function is useful in eliminating the blank spaces in a string normally caused by some data entry error. Why do you want to do this? Well because a sorting error can happen if you are trying to sort ” Dan, “Fred”, and “Ann”. ” Dan” will show up on top before “Ann” because […]

Continue Reading

How To Write A Recordset To File With VBA

In this video you’ll find out how to write a recordset to a file with VBA using the Microsoft Scripting Object. You’ll find out how to take your table data, and export it to a csv formatted file so you can share it with other applications. Use this method to get your data out of […]

Continue Reading

How To Do An Access Export To Excel In VBA

In this post, we are going to do an Access export to Excel, and you’ll see the VBA we’ll work with. This Excel automation will create a worksheet for each of our data points, and then enter the row items for that data point. We are going to let Access do most of the querying […]

Continue Reading

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

MS Access Running Count With String Column And Duplicates

In my previous post, http://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

Recordset In VBA – PT1

In these next 2 videos, we are going to discuss generating the recordset in VBA techiques: -We will access data in tables by using the ADO recordset object. -We will retrieve data from a table using SQL and ADO recordsets. -We will alter the data in the table using SQL and ADO recordsets. In this […]

Continue Reading

VBA Do Loop

Looping structures like the VBA Do Loop allow you to specify the conditions under which you would like your program to run a set of code statements repeatedly. There are 4 different variations of the VBA Do Loop we are going to look at: ‘Do While…Loop structures check the condition before running the code. ‘The […]

Continue Reading




 

Call Erik Now