473,756 Members | 1,808 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error after importing forms from backup copy of project

Good morning.

I recently made some changes to my Access project, and I introduced
some problems that I could not resolve. So I deleted the forms that I had
altered and saved the project. Then I opened my backup copy of
the project, and exported the affected forms to the working copy.

Now when I invoke any event procedures in the affected forms,
I receive the following error (this example is for a click event):

"The expression On Click you entered as the event property setting
produced the following error: User-defined type not defined."

I have extensively reworked the database in my working copy,
so I will lose all of that work if I simply roll back to my backup
copy.

Any suggestions on how to solve this error?

Thanks
-Mark
Dec 26 '06 #1
4 2259
The good news is that, unless you took specific action to remove it, the
event code was not deleted along with the Forms. But when you copied the
Forms from your backup database, the code did not come along with them. From
your description, it seems you may not have backed up the DB with the most
recent changes, so this is likely A Good Thing.

The bad news is, if it was something in your event code that was the
problem, you will still have it when you restore, but if you do, you have
valuable debug information from that fact.

All you will have to do, most likely, is to determine which events had event
code, and select "Event Procedure" for that Event in the Form's Properties.

Larry Linson
Microsoft Access MVP
"Mark" <an*******@hotm ail.comwrote in message
news:11******** ******@bubbleat or.drizzle.com. ..
Good morning.

I recently made some changes to my Access project, and I introduced
some problems that I could not resolve. So I deleted the forms that I had
altered and saved the project. Then I opened my backup copy of
the project, and exported the affected forms to the working copy.

Now when I invoke any event procedures in the affected forms,
I receive the following error (this example is for a click event):

"The expression On Click you entered as the event property setting
produced the following error: User-defined type not defined."

I have extensively reworked the database in my working copy,
so I will lose all of that work if I simply roll back to my backup
copy.

Any suggestions on how to solve this error?

Thanks
-Mark


Dec 26 '06 #2

"Larry Linson" <bo*****@localh ost.notwrote:
The good news is that, unless you took specific action to remove it, the
event code was not deleted along with the Forms.
Before deleting the forms from the working database, I opend the VB
IDE and deleted all of the code for the forms in question. This was
to ensure that the event code didn't inadvertently stay around after I
deleted the forms.
But when you copied the Forms from your backup database, the code did not
come along with them.
The event code did come along with the forms from the backup database.
The bad news is, if it was something in your event code that was the
problem, you will still have it when you restore, but if you do, you have
valuable debug information from that fact.
The backup database and its code all work fine, but it contains none of
the changes that I want to keep from the working copy (db schema
changes, and some changes to module code.)
All you will have to do, most likely, is to determine which events had
event code, and select "Event Procedure" for that Event in the Form's
Properties.
I tried removing all the event procedure code to a text file, then restoring
it one procedure at a time and testing at each step. This seemed to work
fine until the dreaded error inexplicably spread to another form that had
not been affected before. Now it's _really_ broken.

Dec 26 '06 #3

"Larry Linson" <bo*****@localh ost.notwrote:
The good news is that, unless you took specific action to remove it, the
event code was not deleted along with the Forms.
Before deleting the forms from the working database, I opend the VB
IDE and deleted all of the code for the forms in question. This was
to ensure that the event code didn't inadvertently stay around after I
deleted the forms.
But when you copied the Forms from your backup database, the code did not
come along with them.
The event code did come along with the forms from the backup database.
The bad news is, if it was something in your event code that was the
problem, you will still have it when you restore, but if you do, you have
valuable debug information from that fact.
The backup database and its code all work fine, but it contains none of
the changes that I want to keep from the working copy (db schema
changes, and some changes to module code.)
All you will have to do, most likely, is to determine which events had
event code, and select "Event Procedure" for that Event in the Form's
Properties.
I tried removing all the event procedure code to a text file, then restoring
it one procedure at a time and testing at each step. This seemed to work
fine until the dreaded error inexplicably spread to another form that had
not been affected before. Now it's _really_ broken.

Dec 26 '06 #4
Mark wrote:
Good morning.

I recently made some changes to my Access project, and I introduced
some problems that I could not resolve. So I deleted the forms that I had
altered and saved the project. Then I opened my backup copy of
the project, and exported the affected forms to the working copy.

Now when I invoke any event procedures in the affected forms,
I receive the following error (this example is for a click event):

"The expression On Click you entered as the event property setting
produced the following error: User-defined type not defined."

I have extensively reworked the database in my working copy,
so I will lose all of that work if I simply roll back to my backup
copy.

Any suggestions on how to solve this error?

Thanks
-Mark
Before I did any of this I would be sure I had made a couple of safety
copies of the db. (I always make two or more because I'm often careless
about these things and find that one is actually my grocery list).

The first two things I would try are:

1. be sure that
Option Explicit is stated at the top of all modules: standard modules;
form modules; report modules and class modules.
then
2. while you have a standard module open, click on the menu bar, Debug
and then Compile.

This may bring up a simple error such as
Dim strLastName as sting
or Cancel as Intger

such errors can come from replaces which are not carefully planned.

but before I did any of this I would be sure I had made a couple of
safety copies of the db.

If this got me nowhere and the occurrence of the error gave me no clue
as to location or cause I would try
SaveasText acForm, "FormName", "FormName" & ".txt"
LoadFromText acForm, "FormName", "FormName" & ".txt"
Kill "FormName" & ".txt"
for every form, beginning with the most suspect.
In most cases, LoadFromText will fail if there is an error in the
form's module. This may identify for you the errant form, if there is
an errant form.

but before I did any of this I would be sure I had made a couple of
safety copies of the db.

If this still got me nowhere I might try posting the text file of the
most likely bad form here, or I might begin a new db and import each
object individiually until one gave me a problem.

but before I did any of this I would be sure I had made a couple of
safety copies of the db.

If none of those worked I would come back and ask, "What now?"

but before I did any of this I would be sure I had made a couple of
saftey copies of the db.

By Acces project do you mean Access project or do you mean "Access Data
Project" (ADP)?

DId I mention "Before I did any of this I would be sure I had made a
couple of safety copies of the db?"

Dec 26 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4340
by: Andante.in.Blue | last post by:
Our Access 97 database is a single-file (non-splitted, pure Access) hosted no a network server, accessed regularly by a handful of users around the office. Until recently (until the Great Blackout, actually), there have been no problem with the database. It seems to handle simultaneous users fine and did not cause any grief. The blackout corrupted the DB, but we restored a pre-blackout version, so everything was good for a while.
3
1749
by: Serious_Practitioner | last post by:
Hello, all - A few days ago, I posted the following message - Hello all, and thank you for your help in the recent past. Got a new error message in the last few days. While working with different sized tables, in datasheet view, I've gotten this message -
1
1378
by: Serious_Practitioner | last post by:
Good day - As you suggested, I got and used the right version of Jetcomp, and I also tried to run compact and repair a couple of times. I think that the compact and repair process doesn't fully complete - there's a little progress bar in the lower left area of the status bar that gets about halfway done, and then stalls. It doesn't keep me from closing the database, it just stops. So that seems to be out. Similarly Jetcomp, which seemed...
4
5156
by: Brian K. | last post by:
I am trying to split up and secure a database that we've been using on a network for a few years, following the procedure listed in Q304932 from microsoft. I create a new blank database for the front end, and am able to import tables and link from the backend. Queries come in ok too. When I tried to import Modules, forms, and reports, most of them failed with the error: "File Not Found:...
1
114429
by: Alex D. | last post by:
I upgraded one of my applications to beta 2. conversion seemed to work OK, problem is when trying to build I get an error like: it is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. this error is pointing to this section in my web.config: <authentication mode="Forms">
9
2392
by: advance scout | last post by:
HELP! My database is suddenly corrupted. My computer was acting funny (very sluggish) and was shut down. Access had been already been closed down but computer was acting very slow , so perhaps it was still open. I am now getting a "The data base ... is corrupted and needs to be repaired" error . I have made copies of the corrupted database so that I could try to repair and still have a corrupted copy available. When I try to repair , it...
1
1347
by: GS | last post by:
when I try choose an image by importing a bmp file. I found the visual studio express creating a designer vile for my project. that is if my assembly name is myapp, I will find a new file myapp.designer.vb that did not exist before. what bothers me is that immediately I see a lot of errors showing up on missing various dataset, components. if save the project, I would not be able to reopen in designer
0
4019
by: gunsbong | last post by:
hello again everybody.. i just copied the backup file from production to another server with the same config with the production...when i restore the copied backup file this message appears... RMAN> restore database; Starting restore at 17-SEP-07 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=2183 devtype=DISK allocated channel: ORA_DISK_2 channel ORA_DISK_2:...
11
5592
by: xenoix | last post by:
hey there, im reasonably new to C# and im currently writing a backup application which im using as a learning resource. My PC :- Visual Studio 2005 .NET Framework 2 Component Factory Krypton Tools Test PC :- .Net Framework 2
0
9456
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9872
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9843
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9713
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8713
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5142
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.