Others

Fix Microsoft Access Error 3331 When Filling a Text Box from a Combo Box

Khadija KhanKhadija Khan Nov 13, 2026 868 views

Question details

The user needs to populate a form text box from a cascading combo box without triggering Microsoft Access error 3331.

Product
Microsoft Access
Device & OS
not provided
Scenario
A combo box contains ScheduleNumber and Topic fields, and its Change event assigns a selected value to a text box.
Observed behavior
The form displays error 3331 when the Change event attempts to populate the text box.
Before you start

Open the form in Design View and identify the combo box and text box names. In the combo box Property Sheet, check Row Source, Column Count, and Bound Column to confirm which column contains ScheduleNumber.

Solution 1Recommended

Move the text box assignment to the combo box AfterUpdate event

Use AfterUpdate to populate the text box after a combo box selection is committed, rather than during typing or intermediate changes.

The Change event can run while the user is still editing the combo box text. AfterUpdate is the appropriate event for copying a value from a completed selection.

1
Open the combo box event settings

Open the form in Design View, select cboTopic, and press F4 to open the Property Sheet. On the Event tab, locate On Change and After Update.

2
Remove the assignment from Change

Click the build button (...) beside On Change to inspect its event procedure. Remove the line that assigns the combo box column to txtSchedule, while leaving any unrelated logic intact.

3
Add the assignment to AfterUpdate

Set After Update to [Event Procedure], click the build button (...), and add this code inside the procedure: Private Sub cboTopic_AfterUpdate() Me.txtSchedule = Me.cboTopic.Column(0) End Sub Replace cboTopic and txtSchedule if your controls use different names.

4
Test the selected column value

Save the form, switch to Form View, and select a Topic from the combo box. Confirm that txtSchedule displays the corresponding ScheduleNumber. Column(0) means the first column in the combo box Row Source; adjust the index if ScheduleNumber is in another column.

Column indexes and bound columns use different numbering: The VBA Column property is zero-based, so Column(0) is the first column. The Property Sheet's Bound Column setting is one-based, so Bound Column 1 refers to that same column.
Free Microsoft Office alternative

Use WPS Office for Documents and Spreadsheets Alongside Access

WPS Office is a free, lightweight, easy-to-use alternative for everyday document, spreadsheet, and presentation work. Its familiar interface and Microsoft Office format compatibility support a smooth migration for those files. It does not repair Access error 3331 or replace Access forms, relationships, or VBA workflows.

Prepare supporting schedule lists and reports in WPS Spreadsheets.Work with Microsoft Excel .xlsx, Word .docx, and PowerPoint .pptx files.Use a familiar Office-style interface for an easier transition.Keep everyday document work lightweight while maintaining Access separately for database tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Why should I use AfterUpdate instead of Change for combo box autofill?

Change can fire as the user types, before a selection is committed. In Design View, select the combo box and use Property Sheet > Event > After Update to run the text box assignment after the selection is updated.

Does Column(0) always return ScheduleNumber?

No. Column(0) returns the first column in the combo box Row Source, even if that column is hidden. Check Property Sheet > Data > Row Source and use the zero-based index of the ScheduleNumber column.

What should I check if AfterUpdate still produces an error?

In Design View, select txtSchedule and inspect Property Sheet > Data > Control Source. Make sure you are not assigning to a calculated control or a noneditable field. Also verify the form's Record Source is updateable and the assigned value matches the destination field's data type.

Do I need to store both ScheduleNumber and Topic in the related table?

Usually, store only the referenced record's key in the related table and retrieve descriptive information through a query or combo box. Check the primary key in table Design View and the relationship under Database Tools > Relationships before changing the form bindings.

Can WPS Office open and fix this Access form?

No. This fix requires Microsoft Access form events and database bindings. WPS Office is an alternative for compatible document, spreadsheet, and presentation files, not for editing Access .accdb forms or their VBA procedures.