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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
63,315
Office Version
  1. 365
Platform
  1. Windows
Can you please post the VBA code behind it so we can see it?
 

JONeill

Board Regular
Joined
Sep 2, 2018
Messages
58
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.
 

JONeill

Board Regular
Joined
Sep 2, 2018
Messages
58
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,303
Messages
5,836,526
Members
430,437
Latest member
Emilycr

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
Top