Access Queries

Access queries help and tips

Whether to exists or not exists, that is the question…

This is second part of 2-part series on SQL clauses. Juan covered the IN() in the first part. We now turn to a close sibling, EXISTS clause. As Juan demonstrated, IN() can be useful for some situations where we want to match a subset of another table without necessarily changing the output due to jo [...]

2021-06-10T10:02:29-05:00October 2nd, 2013|

Are you IN or are you out? (Not IN)

This is a part one of two-part on how you can make your queries much more powerful. In first part, we look at whether we're in or not. Part two can be found here. The IN clause is a great tool to have in your arsenal, it can allow your forms to be editable or filter forms using . What is the IN clau [...]

2021-06-10T10:01:32-05:00September 23rd, 2013|

Matching records using a date range

The other day I asked Ben to help me with a thorny problem, I needed to match records in one table with records in another table using a date range. Here's the table I needed to update, called tblWidgets: WidgetID DateProduced WidgetWeekID ------- ------------ ---- 1 1/2/11 2 1/16/11 3 1/31/11 Widge [...]

2021-03-18T07:36:48-05:00October 10th, 2011|

Code to help you debug SQL code – POPQuery

I use SQL in my code a lot, I'm not a fan of creating queries and then referencing them in my code  since users may delete or change them. Often I build SQL strings and then I need to debug them in the query Access grid, in the past I would get the value of my SQL string in the immediate window and [...]

2010-10-22T16:03:51-05:00October 22nd, 2010|

Criteria for the current month in a query

The other day I needed to create a query where it returns all records with dates for the current month. I did not want to hard code the beginning and ending dates in the query, so I came up with the following line of code you can paste into your query: Between CDate(Month(Date()) & "/1/" &am [...]

2009-11-06T10:55:52-06:00November 6th, 2009|
Go to Top