Others

How to Fix Data Type Errors When Setting an Access Yes/No Field from a Combo Box

Emma BrownEmma Brown Nov 4, 2026 870 views

Question details

The user needs to resolve a data type error that occurs when assigning a combo box value to a Yes/No table field named Repeat in a Microsoft Access form.

How to Fix Data Type Errors When Setting an Access Yes/No Field from a Combo Box
Product
Microsoft Access
Device & OS
not provided
Scenario
Designing an Access form where a combo box is bound to a Yes/No field, but selecting an option triggers a data type mismatch error.
Observed behavior
Microsoft Access throws a data type error because the combo box is returning a text string instead of a Boolean-compatible numeric value expected by the Yes/No field.
Before you start

Open your Microsoft Access database, navigate to your form, and switch to Design View to access the Property Sheet for your combo box control.

Solution 1Recommended

Configure the Combo Box with a Hidden Boolean Value Column

Modify the combo box settings to store the required Boolean numeric values (-1 for Yes, 0 for No) in a hidden column while displaying user-friendly text labels.

A Yes/No field in Access requires a Boolean value, which internally is represented as -1 for True (Yes) and 0 for False (No). If your combo box passes text like "Yes", it will result in a data type error.

1
Change Row Source Type

Select the combo box in Design View, press F4 to open the Property Sheet, navigate to the Data tab, and set 'Row Source Type' to 'Value List'.

2
Define the Row Source

In the 'Row Source' property, enter the following string: -1;"Yes";0;"No".

3
Adjust Format Properties

Switch to the Format tab. Set the 'Column Count' to 2. This tells the combo box to read the values in pairs.

4
Hide the Value Column

Still on the Format tab, change 'Column Widths' to 0";1". This hides the first column containing the numeric values (-1 and 0) and displays only the text labels (Yes and No).

5
Set the Bound Column

Go back to the Data tab and ensure the 'Bound Column' is set to 1. This ensures that the hidden numeric value is the data sent to the bound Yes/No table field.

Configure the Combo Box with a Hidden Boolean Value Column
Data Type Error Resolved: By passing -1 and 0 to the underlying table, Access perfectly matches the Yes/No field requirements without displaying confusing numbers to the user.
Free Microsoft Office alternative

Boost Your Daily Productivity with WPS Office

While specialized database work requires Microsoft Access, your everyday document editing, spreadsheet analysis, and presentation tasks can be handled seamlessly with WPS Office. It provides a lightweight, highly compatible, and free alternative to Microsoft Office.

  1. 1. Visit the WPS Website: Go to the official WPS Office website on your device.
  2. 2. Download the Installer: Click the 'Free Download' button to get the latest lightweight installer.
  3. 3. Install and Start Creating: Follow the simple on-screen instructions to install the software and open your Office documents instantly.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx)Lightweight installation that runs smoothly on almost any device OSFamiliar ribbon user interface with zero learning curve for Office usersIncludes a robust built-in PDF editor and comprehensive toolkit
microsoft office alternative - wps office

Frequently Asked Questions

Why does Microsoft Access show a data type error for a Yes/No field?

Access Yes/No fields are strictly Boolean and require numeric values (-1 for True/Yes, and 0 for False/No). If your combo box tries to write a text string like "Yes" into this field, it causes a data type mismatch error.

Can I use 1 instead of -1 for Yes in Microsoft Access?

While standard SQL often uses 1 for True, Microsoft Access natively uses -1 for True (Yes) and 0 for False (No). It is best practice to use -1 to ensure perfect compatibility and avoid unexpected behaviors in Access queries and forms.

Is it better to use a combo box or a checkbox for an Access Yes/No field?

A standard checkbox is usually the most intuitive UI control for a simple Yes/No field. However, if form layout constraints dictate a dropdown, or if you need a null state (Triple State), a combo box or option group is highly suitable.

How do I hide a column in an Access combo box?

Open the combo box Property Sheet and go to the Format tab. Ensure your Column Count includes the column you want to hide, then set its corresponding value in the Column Widths property to 0 (e.g., typing 0";1" hides the first column).