Tag Archives: MS Access Queries

Unable to Get SQL View To Work With The Monaco Editor?

Software Bug

If you’re using the new Monaco SQL Editor, you might have noticed an annoying issue at times: the SQL View option disappears, making it impossible to switch between design or results view and the SQL code or simply loads an empty text editor as if your SQL Statement had vanished into thin air. While the Monaco editor brings a sleeker interface with improved code editing features, it currently doesn’t always play well with SQL View depending on certain factors and types of queries.
 
Continue reading

Mastering Microsoft Access’ DLookUp Function

Outside of queries, DLookup is another built-in versatile and essential function in Microsoft Access that allows users to retrieve specific field values from tables or queries based on a defined criteria. This function is particularly useful when you need to access data that isn’t directly available in your current form, report, or query.
 

Syntax and Structure

The basic syntax of the DLookup function is as follows:

DLookup(expr, domain, [criteria])
  • expr
    The field or expression you want to retrieve.
  • domain
    The table or query name containing the data.
  • criteria
    Optional. The criteria to filter the records with.

 
Continue reading

Choosing Between & and + for String Concatenation in VBA

Visual Basic for Applications (VBA) is a powerful tool for automating tasks in Microsoft Office applications. One common requirement in programming is to concatenate strings, especially when dealing with names. However, handling null values can lead to unexpected results. In this article, we will explore two methods of concatenation in VBA: using the ampersand (&) and the plus sign (+). We will also discuss how to manage null values effectively.
 

The Basics of Concatenation

Concatenation is the process of joining two or more strings together. In VBA, this can be achieved using either the `&` operator or the `+` operator. While both operators can be used for string concatenation, they behave differently when encountering null values.
 
Continue reading

Understanding Queries in Microsoft Access: A Detailed Guide

Microsoft Access is a powerful database management tool that allows users to create, manage, and manipulate data effectively. One of the core functionalities of Access is its ability to execute queries, which are essential for retrieving and modifying data within a database. This guide will explore the different types of queries available in Access — SELECT, INSERT, UPDATE, and DELETE —along with their applications in data retrieval and manipulation.
 
Continue reading

Let’s Improve The New Microsoft Access Monaco SQL Editor

Collaborating for Improvement: Addressing the Flaws of the Monaco SQL Editor

It’s time for us to unite and demand that Microsoft take significant steps to improve the current state of the Monaco SQL Editor. While this new feature was marketed as a major upgrade, the reality is far from what users were promised.

I’ve put together a series of suggestions for the Feedback Portal, and I urge you to take just 30 seconds to upvote each one. It’s crucial that Microsoft understands how vital it is to fix and enhance the initial release of the Monaco SQL Editor, which has been riddled with issues since its rollout.
 
Continue reading

Working With Dates and Times

This is something I’ve been wanting to do for quite a while, that is, to create a page dedicated to working with Dates and Times.

I was doing a little more advanced Date/Time VBA programming and decided that now was as good a time as ever to start creating such a page.  So here it is.

This article will evolve with time, so come back from time to time.

Continue reading

How-to Change a Table Field’s Data Type

I thought I’d share a function a created a while back to help a forum user out who wanted to update the data type of all matching table fields throughout their database.

So, yes, we could manually alter the data type via the Table Designer.

Obviously, we could perform such an operation using SQL using an SQL Statement following the basic syntax of:

ALTER TABLE [YourTableName] ALTER COLUMN [YourColumnName] YourDesiredDataType;

Therefore, a concrete example would be:

ALTER TABLE [Contacts] ALTER COLUMN [Active] INT;

But this will need to be performed manually for every matching field in every database table of interest. The goal was to create a VBA procedure to perform this command on every instance.

Easy enough!

Continue reading

Microsoft Access Compact and Repair

What is Compact and Repair (C&R)?
What does it do exactly?
Why do most experience developers recommend it so much?

Well, these are some of the questions that I am going to try to answer in this article. So let’s take a closer look at Microsoft Access’ Compact and Repair command.

Continue reading