Hi Jone,
So, to summarize, you've created a brand new database in Access 2007, SP-1,
imported all objects *except* for the two problem forms, and then re-created
one of the forms from scratch. This only comes up when you create code or
attach a macro to this new form. Have I captured this accurately?
This problem only comes up on 2 of my forms not all
Do any of your other forms include VBA code or call macros? Or, does this
problem only strike forms that have this in common? If this only happens on
forms that include VBA code, and/or include macro(s) in the event procedures,
then [Long shot, but worth a try] try temporarily disabling your antivirus.
Also, are you able to use the undocumented SaveAsText command on these
forms? Try doing so on a newly built form, *before* doing anything that
causes this error (apparently adding code or calling a macro). Save the
output file with an appropriate name. Here is an example, from the Immediate
Window (open with <Ctrl><G>):
Application.SaveAsText acForm, "FormName", "C:\Temp\OkForm.txt"
Then, do whatever you've done in the past that causes this error to be
generated. Then repeat the SaveAsText to a new filename. For example:
Application.SaveAsText acForm, "FormName", "C:\Temp\BadForm.txt"
Use NotePad, and copy/paste the contents of the two text text files to a
reply.
Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
Jone said:
I did that, and getting the samp error