Runtime error 2186: This property isn't available in Design view

Pookiemeister

Well-known Member
Joined
Jan 6, 2012
Messages
563
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I'm learning how to use a listbox in access 2010. Normally I will use YouTube as a visual guide when I am stuck. One of the tutorials shows how to show the selected value of listbox by using the Immediate window. So I entered the following inside the immediate window: This is my information not from the video
"?Forms!frmMaintenanceEntries!lstAdjustment" and according to the video, it should return the word "NULL" but mine returns the value "Runtime error 2186: This property isn't available in Design view". I'm not sure if it matters, but the demonstration was done in office 365 or Office 2019. Thank you.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
If you care, yours doesn't "return a value", it raises an error. It should work as long as you didn't use quotes like that. Your syntax is OK but I would replace the second bang (!) with a dot. If Access thinks you're invoking a property you might have some corruption going on as there's no way that lstAdjustment is a property. Or is the selected value being confused with a property because you've used a reserved word in the bound field name or one or more row values?
 
Upvote 0
I got it to work and all I did was restart access, Retyped the same information in the immediate window and it worked. Thanks for you help.
 
Upvote 0
Solution
I got it to work and all I did was restart access, Retyped the same information in the immediate window and it worked. Thanks for you help.
I think that it is likely the form was not in design View when you got it working? :unsure:
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,233
Members
449,092
Latest member
SCleaveland

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top