Fix Microsoft Access Error 3331 When Filling a Text Box from a Combo Box
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.
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.
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.
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.
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.
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.
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.
Check the form bindings and store only the related record key
Use this check if the event change does not resolve the error or the form stores duplicate schedule and topic information.
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.

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.




