logo
search
Others

How to Fix IIf Function Errors in Microsoft Access

Algirdas JasaitisAlgirdas Jasaitis Oct 9, 2026 870 views

Question details

The user is encountering syntax and separator errors when attempting to use the IIf function in Microsoft Access.

How to Fix IIf Function Errors in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
Entering a logical expression using the IIf function in a query, control source, or Expression Builder.
Observed behavior
Access throws operand, operator, comma, or quotation-mark errors even for seemingly valid expressions like IIf((1+1=2),'yes','no').
Before you start

Verify the exact context where you are entering the expression (e.g., Expression Builder, query design, or form control) and ensure your Microsoft Office is updated.

Solution 1Recommended

Verify and Adjust Windows Regional List Separators

Access relies on your Windows regional settings to determine whether to use commas or semicolons to separate arguments in functions.

Often, a seemingly perfect formula will throw errors because the system expects a different list separator based on your geographic region.

1
Open Windows Region Settings

Open the Windows Control Panel, navigate to 'Clock and Region', and then click on 'Region'.

2
Access Additional Settings

On the Formats tab of the Region dialog box, click the 'Additional settings' button at the bottom.

3
Check the List Separator

Locate the 'List separator' field. Note whether it is set to a comma (,) or a semicolon (;).

4
Apply the Correct Separator in Access

Return to Microsoft Access and rewrite your IIf function using the exact separator specified in your Windows settings. For example, if it is a semicolon, use IIf([Field]=1; 'Yes'; 'No').

Verify and Adjust Windows Regional List Separators
Quick Fix: If you frequently share databases internationally, standardizing the Windows list separator across user machines can prevent these errors.
Free Microsoft Office alternative

Try WPS Office for Your Data and Document Needs

While WPS Office does not include a direct database management program like Access, it offers a powerful Spreadsheet application for data analysis, alongside robust Writer and Presentation tools. Enjoy a free, lightweight alternative to Microsoft Office with high compatibility and a familiar interface.

Seamless compatibility with Microsoft Excel (.xlsx) formats for data managementPowerful IF and logical functions equivalent to Access IIf for data analysisLightweight software that consumes minimal system resourcesFree to download and use with a highly familiar user interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does the Access Expression Builder show pipe (|) characters in the IIf function?

The pipe characters often appear as placeholders in the Expression Builder's tooltip syntax guide. You should replace these pipes with your system's actual list separator (usually a comma or semicolon) when writing the final formula.

Can I use semicolons instead of commas in the IIf function?

Yes, if your Windows Regional Settings have the 'List separator' defined as a semicolon. This is common in many European locales. Access requires you to use the separator defined by your operating system.

Why am I getting a quotation mark error in my IIf statement?

This error typically occurs if you forget to enclose text strings in double quotation marks within the true or false parts of the function, or if you accidentally pasted formatted 'smart quotes' from a word processor instead of using standard straight quotes.