VBA & Macro Problems

Fix an Access VBA Compile Error on a Control's Visible Property

Jason MillerJason Miller Nov 22, 2026 868 views

Question details

Resolve a VBA compile error involving a form control's Visible property in Microsoft Access.

Product
Microsoft Access
Device & OS
not provided
Scenario
A form uses VBA to change a control's visibility in its Load or Before Update event.
Observed behavior
Access reports “Method or data member not found”; a control name mismatch, an unsupported property, or another compile error may be responsible.
Before you start

Open the affected Access database and identify the form and event code that reference the control. You will need access to the form's Design View and the VBA editor.

Solution 1Recommended

Check the control name and compile the form's VBA code

Use this approach when Access reports “Method or data member not found” for a form control reference.

1
Find the control's exact name

In the Navigation Pane, right-click the form and select Design View. Select the control, open the Property Sheet, and check its Name property on the Other tab.

2
Correct the VBA reference

Open the form's code in the VBA editor and compare the reference with the Name property. For example, change Me.Machine_Name if the control has a different name; for a name containing a space, use a reference such as Me![Machine Name].

3
Check the control type and properties

In Design View, confirm which control is selected and review references to its properties in the VBA editor. Check any expression such as Me.Machine_Name.ListIndex and make sure the referenced control supports that property.

4
Compile and fix reported errors

In the VBA editor, select Debug > Compile, followed by the project name. Correct the first highlighted error, then compile again until no further errors are reported.

5
Retest the form events

Open the form in Form View and repeat the actions that trigger its Load and Before Update events. Confirm that the control's Visible property behaves as intended.

Check the whole project: The reported issue may come from another compile error, such as an invalid ListIndex reference, rather than from the Visible property itself.
Free Microsoft Office alternative

Use WPS Office for Compatible Documents and Spreadsheets

WPS Office is a free, lightweight Office alternative with a familiar interface for working with documents, spreadsheets, and presentations. It supports common Microsoft Office formats for easier migration, but it does not fix Access VBA errors or run Access forms.

Work with common Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTX.Use a familiar interface to open and edit everyday Office files.Install a lightweight suite for document and spreadsheet work alongside Access.Use core Office tools for free.
microsoft office alternative - wps office

Frequently Asked Questions

How do I find a control's actual name in Access?

Open the form in Design View, select the control, and check the Name property on the Property Sheet's Other tab. Use that name in the VBA reference.

Can a different VBA error cause the compile message?

Yes. In the VBA editor, choose Debug > Compile and fix the first reported error. Repeat until the project compiles without further errors.

What should I check if ListIndex is highlighted?

Check that the reference points to the intended control and that its control type supports ListIndex. Correct the reference or use an appropriate property for that control.

Can WPS Office fix an Access VBA compile error?

No. Correct and compile the VBA code in Microsoft Access. WPS Office is an alternative for common document, spreadsheet, and presentation files, not for running Access forms.