Fix Access 2010 Error 3270 When Changing a List Box Color
Question details
The user needs to change a list box's background color on a double-click without triggering Error 3270.

- Product
- Microsoft Access 2010
- Device & OS
- not provided
- Scenario
- A user double-clicks the VendorName list box on an Access form to change its background color.
- Observed behavior
- Access displays Runtime Error 3270, “Property not found,” when the color change is attempted.
Open the form in Design View and select the list box. On the Property Sheet's Other tab, check its Name property; the VBA examples below assume the control is named VendorName.
Set the list box BackColor directly in its event procedures
Use the list box control's BackColor property to change its background on a double-click and restore it when the control loses focus.
In Design View, select the VendorName list box and open the Property Sheet. On the Event tab, select [Event Procedure] for On Dbl Click, then click the ellipsis button to open the VBA editor.
In the VendorName_DblClick procedure, use this code: Private Sub VendorName_DblClick(Cancel As Integer) Me.VendorName.BackColor = vbYellow End Sub
Return to the Property Sheet's Event tab, select [Event Procedure] for On Lost Focus, and click the ellipsis button. Add this procedure: Private Sub VendorName_LostFocus() Me.VendorName.BackColor = vbWhite End Sub
Save the form and open it in Form View. Double-click the list box to turn its background yellow, then click another focusable control to restore it to white.

Work with exported Access data in WPS Spreadsheets
WPS Office is a free, lightweight Office alternative with a familiar interface. Export Access data to Excel format and open it in WPS Spreadsheets for an easier transition to spreadsheet editing. WPS does not fix Access VBA errors or run Access forms.

Frequently Asked Questions
Why does Access show Error 3270 when I change the list box color?
Error 3270 means Access could not find a property referenced by the code. Check that the code addresses the list box control and sets its BackColor property directly, such as Me.VendorName.BackColor = vbYellow.
How do I find the list box's control name?
Open the form in Design View, select the list box, and check Name on the Property Sheet's Other tab. Use that name after Me. in the event code.
Can I restore a color other than white?
Yes. In the list box's LostFocus event procedure, replace vbWhite with the original color value. For example, 16777215 represents white.
Will BackColor change only the selected list item?
No. Setting the list box's BackColor changes the control's background, not just the selected row.
Where can I learn more about Access VBA properties and events?
In the VBA editor, place the cursor on a property or keyword and press F1 for help. You can also use View > Object Browser and search for Access controls, properties, and events.




