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?"