Fix Combo Box RowSource Changes Not Saving in Access 2010
Question details
The user needs a combo box RowSource SQL change to persist and apply when an Access 2010 form is reopened.

- Product
- Microsoft Access 2010
- Device & OS
- not provided
- Scenario
- The user edits a combo box RowSource in form Design View and saves the form.
- Observed behavior
- The SQL appears to save in Design View but does not apply after the form is closed and reopened. Saving the SQL as a separate query may not resolve the issue.
Make a copy of the database before repairing or rebuilding it, and ensure other users have closed it. Note the combo box name, RowSource SQL, and event properties so you can restore them if necessary.
Compile the VBA project and compact the database
Use this first to address VBA errors or database inconsistencies that may prevent form changes from applying.
Open the database in Access 2010 and select File > Info > Compact & Repair Database.
Press Alt+F11, then select Debug > Compile in the Visual Basic Editor.
Correct each reported error and select Debug > Compile again. Repeat until the project compiles without errors; the Compile command may then be unavailable.
Return to Access, select File > Info > Compact & Repair Database again, and reopen the form. Check the combo box RowSource in Design View and test it in Form View.
If the RowSource still changes, inspect the form's On Load and On Current event procedures and the combo box events for VBA that assigns a different RowSource.

Decompile and rebuild the VBA project
Try this on a database copy if compiling and compacting do not resolve the problem.
Import database objects or recreate the combo box
Use these rebuilding options if the database or form still does not retain the RowSource change.
Use WPS Office for Documents, Spreadsheets, and Presentations
WPS Office is a free, lightweight Office alternative with a familiar interface and support for common Microsoft Office formats, making everyday document migration straightforward. It does not repair Access databases or replace Access form and VBA tools.

Frequently Asked Questions
Do I have to compact the database before compiling VBA?
Compacting first is a useful troubleshooting step, but compiling does not require it. In Access 2010, use File > Info > Compact & Repair Database, then press Alt+F11 and select Debug > Compile.
Why does my combo box RowSource revert when the form opens?
VBA errors or database inconsistencies may be involved. Code in form or control events can also assign a different RowSource at runtime. Check the On Load and On Current procedures in the form's Property Sheet.
How can I reconnect events after replacing a combo box?
Give the replacement the required name in its Property Sheet. On the Event tab, set each applicable event to [Event Procedure], click the build button, and verify or restore the corresponding VBA code.
How can I tell whether Access is using a newly created control?
Delete the old control in Design View and save the form. Compact the database, close and reopen it, and then insert the replacement. The replacement is a new control even if you give it the same name.
Will saving the RowSource SQL as a separate query fix the problem?
It may make the SQL easier to manage, but it does not necessarily fix the underlying issue. If the form still ignores the change, compile the VBA project and check for code that resets the RowSource.




