Friday, October 16, 2026

How To Handle Null Values Without Nz in Microsoft Access Table Validation Rules Safely

One of those little Access quirks that can make you question your sanity is when a function works perfectly in a query, form, report, or VBA procedure, but suddenly gets rejected when you put it in a table-level validation rule. The classic example is Nz. You know it works. Access knows it works. Yet the table validation property looks at it and says, "Unknown function." Thanks, Access.

The important thing to understand is that table-level validation rules do not use the exact same expression environment as queries, forms, reports, and VBA. They support many common expressions, but not every Access function is available there. So when Access complains that Nz is unknown in a validation expression, the problem usually is not spelling, syntax, broken references, or anything else you did wrong. It is simply an unsupported function in that particular context.

Nz is normally used to replace a Null value with something more useful. For example, in a query you might use it to treat a missing amount as zero. In a form control, you might use it so the user sees a blank string instead of Null. It is one of the handiest functions in Access, and I use it constantly.

But if you try to use something like Nz([Amount],0) in a table-level validation rule, Access can reject it with an "unknown function" message. That error is misleading because Nz is not unknown to Access in general. It is unknown to the validation-rule engine.

So what do you use instead? For table validation rules, rely on the expressions that Access does allow in that property. The most useful tools for dealing with missing values are Is Null and IIf, depending on the rule you are trying to enforce.

For example, suppose an Amount field is optional, but if a user enters a value, it cannot be negative. A table-level validation rule can allow either a missing value or a value greater than or equal to zero. The basic logic is: the field is Null or the value is non-negative.

That distinction matters because Null is not zero. A Null means "no value has been entered." Zero is an actual value. Sometimes treating Null as zero is exactly what you want, especially for calculations. Other times, it can hide missing data that ought to remain missing. Before automatically converting Null to zero, make sure that zero genuinely means the same thing for your business rules.

If your validation depends on more than one field, table-level validation rules can still be useful. For example, you might require an end date to be later than a start date, unless the end date has not been entered yet. In that situation, test for Null explicitly before applying the comparison. Otherwise, Null can cause the validation expression to behave in ways that are not immediately obvious.

This is also a good reason to keep table-level validation rules reasonably simple. They are excellent for protecting the data regardless of how it gets entered: through a form, directly in the table, through an append query, or from some other process. That is a big advantage. A form's validation code only runs when someone uses that form. Table rules help protect the data at the source.

On the other hand, if the validation starts getting complicated, you may be better off handling the user-facing part in a form's Before Update event. There, you have much more flexibility, better error messages, and access to the full range of VBA functions. Just remember that form-level code is not a substitute for table-level protection when the data can be edited through other paths.

The practical takeaway is simple: do not copy an expression from a query or form into a table validation rule and assume every function will be supported. If Nz gets rejected, you are not crazy, and it does not mean that your database is broken. Rewrite the rule using explicit Null checks such as Is Null, along with the comparison logic the rule needs.

Watch the embedded video for the full walkthrough and demonstration of this odd little Access limitation. Once you know table validation rules have their own expression restrictions, this particular error becomes much less mysterious.

Live long and prosper,
RR

Thursday, October 15, 2026

How Do You Lock Paid Order Details On An Order Form in Microsoft Access? Video Quiz A3.3

Ready to see how well you know your way around Microsoft Access forms, macros, locked controls, and paid orders? This Advanced Level 3 video quiz covers five common situations that come up when you need to protect order information without making your users miserable.

The big idea is simple: once an order has been paid, you may want to prevent users from changing the order details while still allowing them to view, select, and copy information. Access gives you several tools for this, but it is important to know which property, control, event, or macro action applies to each situation. Let's see how you do.

Question 1: Users must be able to select and copy the contents of a text box, but they should not be able to edit it. Which settings should you use?

Enabled No, Locked No; Enabled Yes, Locked No; Enabled Yes, Locked Yes; or Enabled No, Locked Yes?

The correct answer is Enabled Yes, Locked Yes.

This is one of those little Access details that gets people. If you set a control's Enabled property to No, it becomes grayed out and users generally cannot select or copy its text. That is fine when you want a control completely unavailable. But if the user needs to copy an invoice number, address, tracking number, or other value, leave it enabled and set Locked to Yes instead.

Question 2: A paid order's detail fields must become read-only, but the description field on the main order form should remain editable. Which single control should you lock?

The order detail subform control, the main form description text box, the paid checkbox, or the main form record selector?

The correct answer is the order detail subform control.

When your order line items are displayed in a subform, the subform control is the convenient place to manage whether those details can be edited. Locking the subform control lets you protect the order details as a group without locking unrelated fields on the main form. That is exactly what you want when paid orders should not have their quantities, prices, or products changed, but you still need to update something like an internal description or note.

Question 3: Your locking macro works when the Paid check box changes, but when you move to a different order, the controls keep the old locked or unlocked settings. Which form event should also run the macro?

On Open, On Close, On Resize, or On Current?

The answer is On Current.

The On Current event runs whenever Access moves to another record. That makes it the right place to refresh the form's locked state based on the current order's Paid value. If you only run your macro after the Paid check box changes, the form can get out of sync as users browse through existing orders. On Current keeps the form honest. Access needs to check the current record, not rely on whatever record happened to be displayed five seconds ago.

Question 4: A macro uses an Input Box to collect text from the user, and you need to use that same response later in a condition. Which macro action stores the response?

Message Box, Set TempVar, Run Macro, or Cancel Event?

The correct answer is Set TempVar.

A TempVar is a temporary variable that can hold a value while your Access application is running. It is useful in macros when you need to capture a response from an Input Box, save it somewhere temporarily, and then compare it later. For example, you might collect a password, store it in a TempVar, and then use that value in a conditional expression before allowing a sensitive change.

Question 5: A user clears the Paid check box but enters the wrong password. Which event and action can cancel that change?

After Update, then Cancel Event; Before Update, then Message Box only; Before Update, then Cancel Event; or On Current, then Message Box only?

The right answer is Before Update, then Cancel Event.

If you need to stop a user from changing a value, you must catch the change before Access saves it. The Before Update event is where you can ask for the password, test the response, display a warning if necessary, and use Cancel Event to prevent the Paid check box from being updated. Waiting until After Update is too late because the value has already changed. By then, the alien merchants may have already escaped with the cargo.

How did you do? If you got all five, congratulations, your paid orders are probably safer than most intergalactic trade agreements. If you missed a few, these are exactly the kinds of form and macro techniques covered in Microsoft Access Advanced Level 3.

The embedded video includes the full quiz, and the complete class goes deeper into controlling edits on forms, locking controls appropriately, responding to form events, and using macros to enforce business rules in your database.

Live long and prosper,
RR

Wednesday, October 14, 2026

Microsoft Access Big Forms Give Your Dashboards More Room

If you have a nice big widescreen monitor but your Microsoft Access forms still feel like they are trapped in a tiny little box, Microsoft has some good news for you. Access now supports big forms, giving you much more room to build wide dashboards, spread out controls, display charts, and make everything easier to read without shrinking the font down to microscopic size.

This is a new Microsoft 365 Access feature, and the basic idea is wonderfully simple: an individual form can now have a much larger design surface than it could before. You do not need VBA, special form properties, or any complicated workaround just to make the form wider. Open the form in Design View, drag the right edge farther out, save the form, and you have more canvas to work with.

For years, Access forms had a practical width limit of roughly 22 inches. That was plenty back when most people were working on smaller monitors, but modern displays are a different story. If you have a large desktop monitor, especially an ultrawide display, it is easy to feel like Access is wasting a lot of perfectly good screen real estate.

With big forms, you can continue expanding the form design area well beyond the old limitation. Microsoft says forms can now extend to around 200 inches. No, you probably do not need a form that is 200 inches wide. Although I have learned never to say never when it comes to what people will build in Access.

The obvious use for this is a dashboard. You can keep customer information on the left, place a sales chart in the center, add a pie chart or summary figures on the right, and still have enough breathing room that the form does not look like someone packed it with a shoehorn.

Wide forms are also useful for operational screens where you need several pieces of information visible at once. For example, you might have customer details, recent orders, account notes, open support cases, and key totals all on one form. Previously, that often meant creating tabs, stacking subforms, or making the user scroll around. Those techniques still have their place, of course, but now you have more layout options.

Another benefit is readability. As I get older, I find myself appreciating bigger fonts and more spacing between controls. You can make labels easier to see, give text boxes some room, and make charts large enough to actually be useful. A chart that is three inches wide may technically be a chart, but it is not always a chart anyone can read.

To try it yourself, open an existing form in Design View. Scroll to the right side of the form and drag the form boundary outward. You can also increase the height if you need more vertical space. Then save the form and open it in Form View to see how it looks.

Keep in mind that Access will not automatically rearrange your existing controls. Making the canvas larger does not magically redesign the form for you. You still need to decide what belongs in that new space, how far apart controls should be, and whether the layout makes sense for the people who will actually use the database.

That last part is important. A form that looks fantastic on your 34-inch monitor may be a mess on someone else's laptop. Their display may have a lower resolution, different Windows scaling, larger text settings, or simply less available screen width. Before you turn every form in your database into the Access equivalent of a movie theater screen, think about where it will be used.

Check the form on the computers your users actually have. Look at display scaling, font sizes, buttons near the far right edge, and anything that might disappear off-screen. The newer Access zoom features can help in some situations, but zooming is not the same thing as having a layout that works well on a smaller display.

There is another big compatibility issue to consider before sharing these forms. The recipient needs a version of Access that supports large form dimensions. Microsoft lists Microsoft 365 Access version 2609, with the appropriate build number or later, as the starting point for this feature.

That means someone using an older perpetual version of Access, such as Access 2021 or Access 2024, may not have support for these larger forms. If you send them a database containing a form that exceeds the old limits, that form may not open properly on their machine. Nothing says "fun support call" quite like someone telling you the main dashboard will not open.

You can check your own Access version by going to File > Account > About Access. Also remember that Microsoft 365 features are often rolled out gradually. You may have a reasonably current build and still not see the feature immediately. The practical test is simple: open a form in Design View and see whether Access actually lets you expand it beyond the old boundary.

If your organization manages Office updates, you may need to talk to the IT department about whether your Access installation is on the correct update channel. Yes, I know. Talking to IT. Try to remain calm.

When you start converting important forms, it is smart to keep a backup copy. You might duplicate a form first and give the new version a clear name such as CustomerFBig or BigCustomerF. The exact naming convention is up to you. Just make sure "big" is in there somewhere so that six months from now you remember why there are two versions of the same form.

Big forms also work nicely with overlapping windows. If you use overlapping windows instead of tabbed documents, you can position multiple forms side by side across a wide display. Put the customer form on the left, an order form on the right, perhaps a dashboard or chart in the middle, and you can work with several parts of the database at once.

There are still some limitations involving form positioning and older VBA layout code. In particular, Access has a roughly 32,000-twip positioning limit in some situations. So while the form itself can be much larger now, code that moves forms or controls around may still need special handling when you get far out to the right side of a very wide layout.

The basic big-form feature does not require any code at all. However, if you are building sophisticated wide-screen layouts, automatically positioning forms, or lining up multiple large forms across a monitor, the VBA details matter. The embedded video demonstrates the feature, and the extended developer material goes into those positioning limits and some tricks for working around them.

Overall, this is a very welcome improvement for Access users with modern displays. It gives dashboards room to breathe, makes charts more useful, and lets you create cleaner layouts without cramming everything into the same old narrow form width. Just make sure your users have a compatible version of Access before you deploy your new giant masterpiece.

Watch the embedded video for the full walkthrough and a look at big forms in action.

Live long and prosper,
RR

Tuesday, October 13, 2026

More Wi-Fi Made My Wi-Fi Worse

It is entirely possible to improve your Wi-Fi setup right into a pile of problems. I know, because I did it. I added extenders, tried mesh systems, increased coverage around the house, and somehow ended up with Ring cameras that kept going offline and Alexa devices that suddenly forgot how to play music. Apparently, my smart home needed me to stop being so helpful.

The lesson is not that Wi-Fi extenders or mesh systems are always bad. Plenty of people use them successfully. The real lesson is that adding more equipment does not automatically make a network better. Every extra box adds another connection, another setting, another possible source of interference, and another opportunity for a stubborn device to connect to something other than what you expected.

My main router is near the living room, where the television needs a good, fast connection. That part works fine. The problem was the backyard. The Ring cameras are much farther away, so their signal was weaker. Naturally, I figured I would just add equipment to extend the Wi-Fi signal out there. How complicated could that be?

At one point, I had multiple extenders placed around the house and yard. Instead of improving things, the cameras became unreliable. The Alexa devices were not particularly thrilled either. The Ring cameras were especially talented at going offline, which is a fairly disappointing feature in something whose whole purpose is to let you see what is happening outside.

When I removed the extra extenders, things started working better. That was a pretty good clue. I cannot claim I performed a controlled laboratory experiment and isolated every possible cause, but the practical result was obvious: my expanded Wi-Fi setup caused more trouble than my simpler one.

I also tried several mesh Wi-Fi systems. On paper, mesh sounds great. You place several units around the house, they all share one network name, and devices are supposed to use whichever access point gives them the best connection. In theory, you can walk around the house without thinking about which Wi-Fi device you are connected to.

The catch is that your phone, camera, speaker, or other gadget gets a vote in that decision. A mesh system can encourage devices to roam between access points, but it cannot force every device to choose the node you think it should use. A device may remain connected to a more distant mesh unit even when you are standing right next to another one. And the physically closest access point is not always the one with the strongest or cleanest signal anyway.

That behavior makes sense technically, but it can still be annoying in the real world. I do not want to negotiate wireless roaming rules with a backyard camera. I want to open the Ring app and see whether the dogs are digging another unauthorized hole in the yard.

What finally worked for me was a much simpler arrangement. My primary Wi-Fi network is named Lazy Dog. I installed one extender in a location where it could still receive a decent signal from the main router. Instead of configuring that extender to broadcast the same Wi-Fi name, I gave it its own name: Lazy Dog 2. Yes, a tremendous amount of creativity went into that sequel title.

Then, when setting up the backyard cameras, I explicitly connected them to Lazy Dog 2. They were no longer free to make their own questionable choices about which access point they preferred. The cameras had a known connection near the backyard, while the television continued using the main router in the living room.

This is where the Wi-Fi name, technically called the SSID, matters. An extender can often broadcast the same SSID as your main router, or it can broadcast a separate one. If both use the same name, your phone or camera may see them as one Wi-Fi network and choose between them on its own. That is convenient when it works well. It is less convenient when a stationary camera keeps choosing the wrong one.

Giving the extender a separate name allowed me to make the choice myself. The backyard cameras use Lazy Dog 2 because I told them to use Lazy Dog 2. For devices that never move, such as cameras, smart TVs, printers, or a desktop computer, that kind of control can be more useful than fancy automatic roaming.

There is one important technical detail here. A separate Wi-Fi name does not necessarily mean you have created a completely separate network. Depending on how the extender is configured, devices connected through it can still communicate with devices on the same local network. It also does not magically eliminate interference or improve a poor connection back to the router.

An extender has to communicate in both directions. It needs a good signal to the main router, and your camera needs a good signal to the extender. If you put the extender in the farthest corner of the yard where it can barely hear the main router, you have simply moved the weak link. A strong signal between the camera and extender is only half of the trip.

That is one of the most common mistakes people make with extenders. They put the extender exactly where the Wi-Fi signal is already terrible. Instead, place it somewhere between the main router and the area that needs coverage. The extender needs enough signal from the router to do its job before it can pass that connection along to the camera, phone, or whatever else needs help.

Also remember that more signal bars do not always tell the complete story. A device may have a strong Wi-Fi signal to an extender, but the extender might have a weak, congested, or unreliable connection back to the router. Wi-Fi is a chain, and the weakest part of the chain can affect everything behind it.

If you are troubleshooting a device that keeps disconnecting, start by finding out what it is actually connected to. Do not immediately buy another extender, another mesh node, or another expensive router. Check the device settings if they are available. Check your router or mesh app to see which access point the device is using. Then change one thing at a time and see what happens.

Sometimes you need a mesh system. Sometimes you need an extender. Sometimes the real answer is a wired access point, Ethernet cable, powerline adapter, or moving the main router. But sometimes the best upgrade is removing extra stuff and using a simpler arrangement that gives you control over the troublesome device.

For me, one clearly named extender network solved the backyard camera problem better than the more complicated setups I tried. The cameras stay connected, the TV has its fast connection near the main router, and I have fewer little networking boxes to think about. That was the goal all along.

If your Wi-Fi setup is already working, resist the temptation to build a trilogy just because you own extra equipment. And if it is not working, simplify first, verify what each device is connecting to, and make changes methodically. You may discover that the answer is not more Wi-Fi. It may just be better organized Wi-Fi.

You can watch the embedded video for the full story and a closer look at why this arrangement worked better for me.

Live long and prosper,
RR

What Happens When You Hide a Bound Customer ID Field in Microsoft Access? Video Quiz X3.2

Time for another Microsoft Access video quiz. This one is aimed at expert-level Access users and covers a handful of form, query, and date-calculation situations that can easily trip people up. Give each question a shot before revealing the answer. No peeking. Your future self will be disappointed.

These questions focus on a callback system, where contacts can be marked for follow-up, filtered into callback lists, and opened with forms and buttons. They also cover an important little detail about hiding bound controls on a form. Let's see how you do.

Question 1: A callback list shows only records where Must Callback is set to True. The call has been completed, but the notes from that call need to remain in the contact table. What should you do before reopening the callback list?

Should you delete the contact record, clear the Must Callback checkbox, clear the callback date or set it to yesterday?

Answer: Clear the Must Callback checkbox.

The callback list is filtered based on that Yes/No field. Once the follow-up is complete, clearing the checkbox removes the contact from the active callback list without deleting the contact or losing the notes. Deleting records just because someone returned a phone call is a little like throwing away your address book after sending a birthday card.

Question 2: A button reads a bound Customer ID text box on a form. What happens if you set that text box's Visible property to No?

Is the stored Customer ID erased? Does the button have to use the customer's name instead? Does the text box become unbound? Or can the button still read the Customer ID?

Answer: The button can still read the Customer ID.

Making a bound text box invisible only hides it from the user interface. It does not erase the value, remove the field from the form's record source, or magically unbind the control. VBA and macros can still refer to the control and retrieve its value normally. This is a common and useful technique when you need an ID value available behind the scenes but do not want users typing into it or even seeing it.

Of course, hidden is not the same as secure. If you need to protect sensitive data, do not assume an invisible text box is Fort Knox. It is simply hidden on that form.

Question 3: You change a default value expression from =Date()+1+(14/24) to =Date()+1+14. What does the revised expression return?

Your choices are tomorrow at 2 PM, midnight 14 days from today, midnight 15 days from today, or today at 2 PM.

Answer: Midnight 15 days from today.

In Access date math, whole numbers represent whole days. The original expression starts with today's date at midnight, adds one day, then adds 14/24 of a day, which is 14 hours. That gives you tomorrow at 2 PM.

But when you replace 14/24 with just 14, Access treats that as 14 additional days. Add the original one day, and you are now 15 days ahead, at midnight. Decimal portions represent time; whole numbers represent days. Tiny difference in typing, very different callback date.

Question 4: A callback form uses a query that selects only records where Must Callback equals True. The button that opens the form says, "Open the form and show all records." Which records actually appear?

Will you see only the records returned by that query, every record in ContactT, only records selected on the main menu, or no records until the button adds another filter?

Answer: Only the records returned by the query.

The form's record source controls the available records. If the form is based on a query that already limits records to Must Callback = True, then "show all records" means all records from that query, not every record in the underlying contact table.

This is an important distinction when working with forms. A button can remove a filter that was applied to a form, but it cannot override the criteria built directly into the form's record source. If you need access to every contact, you need a form or query designed to return every contact.

Question 5: A query displays ContactT.* plus a separate CallbackDateTime column that is sorted ascending. The callback date appears twice in the results. How can you keep every field from ContactT, keep the sort, and display only one callback date column?

Your choices are clearing Show for ContactT.*, removing the separate CallbackDateTime column, sorting ContactT.* ascending, or clearing Show only for the separate date column.

Answer: Clear Show only for the separate CallbackDateTime column.

When you use ContactT.*, Access displays every field in that table, including CallbackDateTime. If you also add CallbackDateTime as its own column so you can sort by it, you will see it twice unless you hide one of them.

The trick is to leave the separate CallbackDateTime field in the query grid, set its Sort row to Ascending, and clear its Show checkbox. Access can still sort on a field that is not displayed. That lets you keep all fields from ContactT, retain the correct sort order, and avoid duplicate columns in the result.

How did you do? If you got all five, congratulations: your callback continuum is intact, your hidden IDs are still working, and your dates have not accidentally traveled two weeks into the future. Watch the embedded video for the complete quiz, and if any of these questions gave you trouble, the related Access Expert Level 3 lesson on building a callback form goes into the details.

Live long and prosper,
RR

Monday, October 12, 2026

Do You Still Need to Learn Microsoft Access If AI Can Build It for You?

AI can write Access queries, suggest table designs, generate VBA, and even help troubleshoot errors. That is fantastic. I use AI all the time myself. But if AI can build so much of your database for you, do you still need to learn Access? Yes. Absolutely. You do not need to memorize every function or type every line of code by hand, but you do need to understand enough to know whether the database is doing what it is supposed to do.

The real value of learning Access is not becoming a human syntax dictionary. It is understanding your data, your business rules, and how the pieces of a database fit together. AI can be a very productive assistant, but it should be treated like a junior developer who works quickly and confidently, occasionally gives you a brilliant answer, and occasionally creates a mess that looks perfectly reasonable at first glance.

One of the biggest dangers with AI-generated database work is that it can produce an answer that runs without errors but is still wrong. That is much more dangerous than a big obvious error message.

For example, AI might generate a query that returns a list of customers, but quietly leaves out customers who meet a certain unusual condition. The query runs. It returns records. Nobody sees a crash. But your employees are now working from an incomplete list.

Or perhaps it writes VBA code that works when you test it one way, but fails when a user opens a form from a different path. Maybe the code belongs in a different event. Maybe it runs before a value has been saved. Maybe it works fine with one record but breaks when there are no records. If you understand the basics, you can look at the result and say, "Wait a minute. Why is this doing that?"

If you do not understand the basics, you may not even realize there is a question to ask.

That does not mean you need flashcards for every VBA command or every argument of every Access function. Nobody has all of that memorized. I look things up too. AI is great for helping you find syntax, explain an unfamiliar function, or draft a starting point for a procedure.

What matters is understanding the structure of the database. You should know why customers belong in one table and orders belong in another. You should understand what a CustomerID is, why relationships matter, and why storing the same customer address on every order record can create problems.

Of course, there are times when repeating information is correct. If you need to know where an order was shipped, you probably should store the shipping address with that order, even if the customer later changes their address. That is why database design is not just a matter of following a rule like "never repeat data." You need to understand why data is stored a particular way.

AI cannot read your mind, either. Ask it to build an inventory database and it has to make assumptions. Are you tracking a few boxes of office supplies in a closet, or managing inventory across three warehouses? What happens when an item is returned? Does it immediately go back into available stock, or does somebody need to inspect it first? What about products promised to customers but not shipped yet?

Those are business decisions. Access does not decide them for you, and AI definitely should not be guessing at them.

The more clearly you understand your own workflow, the better instructions you can give AI. Instead of saying, "Build me an inventory database," you can explain that inventory is received into stock, reserved for open customer orders, removed when shipped, and held separately when returned pending inspection. Now AI has a much better chance of helping you build something useful.

But even with a good prompt, you still have to test the result. Start with simple situations where you already know the answer. If you have 10 widgets and sell 3, the database should show 7 remaining. Then try a return. Try a missing quantity. Try a canceled order. Try two employees attempting to sell the last widget at nearly the same time.

A result is not correct just because it looks plausible. This applies to Access, Excel, SQL Server, Python, and pretty much every other tool. A formula can return a number. A query can return records. A report can print. That does not prove the answer is the answer you actually needed.

You also need to think beyond the first day the database works. What happens next month when someone asks for a new report? What happens when you add a second warehouse, change suppliers, or receive a spreadsheet with columns in a different order? Somebody has to make those changes without breaking what already works.

This is where understanding your own database becomes important. You should know where the data is stored, which forms and queries are important, how to back up the database, and how to restore it when something goes wrong. AI can help document all of that, and it is actually pretty good at documentation when you give it the right information. But saving the original prompt is not the same thing as having a maintenance plan.

Debugging is another place where AI can be useful, as long as you stay in charge. It can spot a backwards comparison operator, a missing reference, a typo, or a likely syntax problem when you have been staring at the code too long. Sometimes it is 3:00 in the morning, you are tired, and the obvious mistake is hiding in plain sight. Let the robot help.

Just do not blindly paste in every fix it suggests. Read the error. Find out what is failing. Ask AI to explain its proposed change before applying it. If it tells you to remove a condition from a query, ask yourself why that condition was there. It may have been the thing preventing canceled orders from appearing in your sales totals. Fixing one error by deleting important logic is not really a fix.

The best way to use AI is to let it handle the routine work while you keep control of the thinking. If you understand how a recordset loop works, for example, you can ask AI to draft a loop that performs a particular task. Then you can read it, adjust it for your situation, and test it. That can save a lot of time without giving up your ability to maintain the database later.

Think of AI like a calculator. You do not need to perform long division by hand every day, but you should still understand whether division is the operation you need in the first place. The calculator does not know what problem you are trying to solve. Neither does AI.

The skills you learn in Access also carry over to other tools. Understanding related tables helps when you move data to SQL Server. Understanding loops and program logic helps when you encounter another programming language. The syntax may change, but the underlying problem-solving skills do not disappear.

So yes, learn Access. Learn enough to understand tables, relationships, queries, forms, reports, validation, business rules, and the general logic behind VBA. Then use AI to speed up the repetitive parts. That is where it shines.

Let AI be your assistant, not your guru. The better you understand Access and your own business, the more useful AI becomes. Watch the embedded video for additional discussion and examples of how to put that approach into practice.

Live long and prosper,
RR

Friday, October 9, 2026

Prevent Duplicate Combinations of Fields in Microsoft Access

An AutoNumber primary key guarantees that every record has its own unique ID. It does not guarantee that the information in that record makes sense. You can still accidentally register the same employee for the same training session twice, add the same product to an order twice, or assign the same warehouse item to the same location more than once. The trick is to define which combination of fields must be unique.

In Access, the usual solution is a unique multi-field index, sometimes called a composite unique index. It lets each individual value repeat where it should, while preventing the specific combination of values that represents a duplicate. No VBA is required, and you do not have to get rid of your AutoNumber primary key.

Consider a registration table. You might have a RegistrationID AutoNumber field as the primary key, plus EmployeeID and SessionID fields. One employee can attend many sessions, so EmployeeID must be allowed to repeat. One session can have many employees, so SessionID must also be allowed to repeat.

What you do not want is the same EmployeeID and SessionID appearing together twice. If employee 7 is registered for session 101, that exact pair should only exist once. Employee 7 can still register for session 102, and employee 8 can still register for session 101. Those are valid combinations.

A common beginner mistake is setting EmployeeID to Indexed: Yes (No Duplicates). That certainly prevents duplicates, but it prevents far too much. Now each employee can only appear once in the entire table. Congratulations, your employees are allowed one training class for the rest of their careers. Probably not the business rule you had in mind.

The same problem occurs if you make SessionID unique by itself. You would only be able to register one employee in each session, which makes for a very quiet classroom.

Instead, leave your AutoNumber field as the primary key and create a separate index that includes both fields. Open the table in Design View, then click the Indexes button on the ribbon. Access will show the existing primary-key index and any other indexes already defined for the table.

On a new row, enter a meaningful index name, such as EmployeeSession. In the Field Name column on that same row, select EmployeeID. On the row directly underneath it, leave the Index Name column blank and select SessionID in the Field Name column. That blank index-name cell is important. It tells Access that SessionID belongs to the same index as EmployeeID, rather than starting a brand-new index.

With the first row of that index selected, set the Unique property to Yes. Save the table. From that point forward, Access will reject a record that repeats the same EmployeeID and SessionID pair.

When a user tries to enter the duplicate, Access will display its standard message indicating that the change would create duplicate values in an index, primary key, or relationship. It is not the friendliest message in the universe, but it does enforce the rule at the table level. That means the protection applies whether records are entered through a form, datasheet, query, import, or some other part of the database.

This is sometimes described as a composite key because the rule is made from multiple fields. A composite primary key is also possible, where the combined fields become the table's actual primary key. That can be a perfectly valid design in some databases. In many Access applications, however, keeping a simple AutoNumber primary key and adding a separate unique composite index is easier to work with, especially when other tables need to refer to one specific record.

The important part is deciding exactly what constitutes a duplicate in your application. Sometimes two fields are enough. Sometimes they are not. Suppose an employee can be assigned to the Navigation duty on Mission 501 and also to Navigation on Mission 502. A unique index on EmployeeID and DutyID would incorrectly block the second assignment. In that case, the real rule is the combination of EmployeeID, DutyID, and MissionID.

The same technique works with three or more fields. Give the index a name on the first row, add the first field, then place each additional participating field on the rows below it with the index name left blank. Set Unique to Yes, and Access will make sure that the complete combination is not repeated.

Before adding a unique index to an existing table, make a backup and work on a test copy if possible. If duplicate combinations already exist, Access will not be able to create the unique index until you clean them up. You may need to run a Find Duplicates query first, review the old records, and decide which ones should remain.

Also remember that uniqueness and required data are two different rules. If every registration must include both an employee and a session, set the participating foreign-key fields to Required: Yes as appropriate. Do not assume that making an index unique automatically means users must fill in every field.

Once the index is in place, test both sides of the rule. Try entering the same employee and same session twice. That should fail. Then try the same employee in a different session, and a different employee in the original session. Those should work normally. The goal is not to block everything. The goal is to block the mistake while allowing legitimate work to continue.

The embedded video walks through the Indexes window in Access and shows the setup in action. Once you understand unique multi-field indexes, they become one of those simple little database tools that can save you from a lot of cleanup later.

Live long and prosper,
RR