Compile Error

Mel Henderson

Registered User.
Local time
Today, 20:12
Joined
Feb 13, 2000
Messages
14
Could any one point me in the right direction with this problem. When I tried to make an MDE file from my database I got the following message “compile error in hidden module: Form_Order_Entry.

When I go to my form in design view and click on the compile icon, the following errom comes back “Type-Declaration Character does not match Declared Data Type”.

MsgBox Error$ is where it high lights the problem, but I notice if I bypass that, it will stop at any line that has “MsgBox Error$.



Private Sub Button65_Click()
On Error GoTo Err_Button65_Click

Screen.PreviousControl.SetFocus
DoCmd.FindNext

Exit_Button65_Click:
Exit Sub

Err_Button65_Click:
MsgBox Error$
Resume Exit_Button65_Click

End Sub

Thanks for any help you can give me in solving this problem.

Mel
 
If you replace MsgBox Error$ with this...

MsgBox Err.Number & " " & Err.Description

...do you still get the compile error?

Are you missing any references?

Click Tools / References... and see if any are missing.

HTH
 
Thanks for the help I replaced all lines of MsgBox Error$ with what you asked me to do, and now I can compile the form and make a MDE file. Thanks alot for your help.

Mel
 
Error$ should work .... you may have a library reference problem.

RDH
 
Ricky, could you point me in the right direction to check or repair my librery reference problem if that could be causing me the trouble. Thanks for your help.

Mel
 
This problem is one of the most common in all of MS Access. You didn't say whether you were on AC97 (or earlier) or AC2K (or later). Makes a difference in where you have to go to research the issue.

From AC97/earlier, select the module window. Open a module in design mode. (Or on a form, open the code segment of a class module.) Code has to be showing. From the main menu bar, follow path

Tools >> References

From AC2K/later, select the module window and open a module in design mode. On the code window's menu bar (which is separate from the main menu bar), follow path

Tools >> References

OK, in that box, you will see a bunch of names and check-boxes. If you see the word MISSING (usually in all caps) on any checked line, Access has lost track of where that module can be found.

Try to uncheck and then recheck the box. If it stays missing, look at the name & path of the file as shown in the dialog box just below the module-list window. Use the start button to initiate a Find Files or Folders function, specifying the name and type of the file but not the location. If the file exists, use the dialog box browser button to find that file. Double-click on it from inside that browser box. If that does not clear up the MISSING flag, I don't know what would do the trick for you.
 

Users who are viewing this thread

Back
Top Bottom