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
Microsoft Access
What is the difference between LEFT, RIGHT, INNER and OUTER JOIN?
I have been working with a lot of SQL lately. I wouldn't label myself an expert, but I have been finding my way around a lot easier the more I work with it. I have been working a lot with normalizing data and writing queries that reference multiple tables. When referencing multiple tables, it is common to write a join. Here is a very small overview that explains the difference … [Read more...] about What is the difference between LEFT, RIGHT, INNER and OUTER JOIN?
SQL QUERY | Sum Values by Group in Access 2010
I have been working with Access a lot lately. In my last project I was working with a table that contained 1.4 million records with count values by US States. I needed run a graph based on the sum of values for each state. My original table looked like this: Table: States State Value MN 54 MN 62 IL 76 MN 34 CA 48 MN 62 IL 4 And so on... All of the way … [Read more...] about SQL QUERY | Sum Values by Group in Access 2010