How to Fix Data Type Errors When Setting an Access Yes/No Field from a Combo Box
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.

- 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.
Open your Microsoft Access database, navigate to your form, and switch to Design View to access the Property Sheet for your combo box control.
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.
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'.
In the 'Row Source' property, enter the following string: -1;"Yes";0;"No".
Switch to the Format tab. Set the 'Column Count' to 2. This tells the combo box to read the values in pairs.
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).
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.

Replace the Combo Box with an Option Group
Use an Option Group, which inherently returns a numeric value, as a simpler alternative to a combo box for Yes/No fields.
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. Visit the WPS Website: Go to the official WPS Office website on your device.
- 2. Download the Installer: Click the 'Free Download' button to get the latest lightweight installer.
- 3. Install and Start Creating: Follow the simple on-screen instructions to install the software and open your Office documents instantly.

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).




