User Defined Type Not Defined

JONeill

Board Regular
Joined
Sep 2, 2018
Messages
58
New to Access programming. Just created a form and wired events to it but every time I bring the form up on either the control or an event like Form_Load, I get a "User Defined Type Not Defined" error. I wired the control events through the property sheet and used the Code Builder option. I'm also testing the events through the interface using Form View.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Can you please post the VBA code behind it so we can see it?
 
Upvote 0
They are just stubs. What I did was to click on the control, and, on the property sheet under the Event tab, I clicked on the ellipse and chose Code Builder. It then created the stub. I get the error when I go into FormView. I can't even get to a breakpoint. It has to be some simple procedural thing I'm not doing.
 
Upvote 0
OK. I found it. Apparently there was an undefined object because the class module was not pulled into the project from the Excel project I was working on. The confusion was that the compiler did not flag it as it normally would (or at least in a way I'm used to) until I did a compile project from the Debug menu. I also had an error on an object who's class module is included in the project named currentRecord. I figure it must be a reserve word because when I changed the name, I got a clean compile.
 
Upvote 0

Forum statistics

Threads
1,223,892
Messages
6,175,236
Members
452,621
Latest member
Laura_PinksBTHFT

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