Loading Error in Access 2007

When opening a database in Access 2007 (originally written in Access 2003), I get the message - An error occurred while loading Form_frm(form name).  Do you wna to continue loading the project?  This happens for only a few of many forms.  Any suggestions?

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

Hi Bill,
 
Have you tried compiling the app? Open any code module, then select [Compile] from the Debug menu. Fix whatever problems are reported and try again.
 
"Bill GC" wrote in message news:*** Email address is removed for privacy *** .com...
When opening a database in Access 2007 (originally written in Access 2003), I get the message - An error occurred while loading Form_frm(form name).  Do you wna to continue loading the project?  This happens for only a few of many forms.  Any suggestions?

Regards, Graham R Seach Microsoft Access MVP Sydney, Australia

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thank you Graham.

When I open the module for the form, it is empty.  So, I cannot compile.  I've also deleted one of the problem forms, and the above message still appears, even when I created a new form with the same name.  Any suggestions?

 

 

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

You don't need code in any particular form to be able to compile. Try it. If it doesn't work, we know we have to try something else.
 
"Bill GC" wrote in message news:*** Email address is removed for privacy *** .com...

Thank you Graham.

When I open the module for the form, it is empty.  So, I cannot compile.  I've also deleted one of the problem forms, and the above message still appears, even when I created a new form with the same name.  Any suggestions?

 

 


Regards, Graham R Seach Microsoft Access MVP Sydney, Australia

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thank you.

I'm not sure what to do.  I have never worked in VB before.  When I run Compile Database, a box appears that says:  Compile Error:  Ambigious name detected:  (form name).  It is about 1/3 of the way down.  The same form name appears at the very top, with the same code, and is not identified as a problem. 

Also, for the forms that will not load, there is no VB language.  It is blank.  All other forms have language. 

Any suggestions?

Thank you.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Bill,
 
Well, we're on the right track. Whenever the compiler highlights a problem, you need to write down the error number, the error message AND importantly, the entire line of code that gets highlighted; then let us know what they are. Please do that when you next reply.

An "ambiguous whatever" error suggests that there could be two of something, but that Access doesn't know which one is being referred to. Strange that it would be a form, but that's why we need to see the code. Actually, if the procedure containing the error isn't too large, post the whole thing here so we can get the 'bigger picture'. Just so you know, a 'procedure' is code usually bounded by Private Sub...End Sub, or Private Function...End Function. Include the Sub...End Sub bits too.
 
"Bill GC" wrote in message news:*** Email address is removed for privacy *** .com...

Thank you.

I'm not sure what to do.  I have never worked in VB before.  When I run Compile Database, a box appears that says:  Compile Error:  Ambigious name detected:  (form name).  It is about 1/3 of the way down.  The same form name appears at the very top, with the same code, and is not identified as a problem. 

Also, for the forms that will not load, there is no VB language.  It is blank.  All other forms have language. 

Any suggestions?

Thank you.


Regards, Graham R Seach Microsoft Access MVP Sydney, Australia

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Graham,

The complier identified this problem:

Private Sub frmMAIN_Close_Click()
On Error GoTo Err_frmMAIN_Close_Click


    DoCmd.Close

Exit_frmMAIN_Close_Click:
    Exit Sub

Err_frmMAIN_Close_Click:
    MsgBox Err.Description
    Resume Exit_frmMAIN_Close_Click
   
End Sub

Many thanks.

Bill

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Bill,
 
Assuming the DoCmd.Close line is the one that gets highlighted, try this:   DoCmd.Close Me.Name
 
 
"Bill GC" wrote in message news:*** Email address is removed for privacy *** .com...

Hi Graham,

The complier identified this problem:

Private Sub frmMAIN_Close_Click()
On Error GoTo Err_frmMAIN_Close_Click


    DoCmd.Close

Exit_frmMAIN_Close_Click:
    Exit Sub

Err_frmMAIN_Close_Click:
    MsgBox Err.Description
    Resume Exit_frmMAIN_Close_Click
   
End Sub

Many thanks.

Bill


Regards, Graham R Seach Microsoft Access MVP Sydney, Australia

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Graham,

I've been a bit busy, and I just looked at your message.  Thank you.

The line that is highlighted is:  Private Sub frmMAIN_Close_Click().  Should that line be modified or the DoCmd.Close line?

Many thanks,

Bill

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Bill,
 
Even though the procedure name ( Private Sub frmMAIN_Close_Click() ) looks strange, it's a valid procedure name.
 
Open any code module; press Ctrl+F (to open the Find dialog). Select [Current Project] from the Search options; enter "frmmain_close_click" into the [Find What] box; and click [Find Next].
 
My guess is that you have two procedures named "frmMAIN_Close_Click".
 
 
"Bill GC" wrote in message news:*** Email address is removed for privacy *** .com...

Hi Graham,

I've been a bit busy, and I just looked at your message.  Thank you.

The line that is highlighted is:  Private Sub frmMAIN_Close_Click().  Should that line be modified or the DoCmd.Close line?

Many thanks,

Bill


Regards, Graham R Seach Microsoft Access MVP Sydney, Australia

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I am having a similar problem with getting the ambiguous name detected when trying to use a control button in a form in an Access 2003 created form that has been converted to Access 2007.  Additionally I cannot get built-in functions, such as "Trim" to work in reports.  I have no idea on how to "compile" the app, what a "code module" is or how to do any of the instructions you have given in this message train.  Please help.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

 
 

Question Info


Last updated October 5, 2021 Views 1,737 Applies to: