Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switchboard buttons lost connection and lost code. Help!

Status
Not open for further replies.

gmgrace

Technical User
Dec 7, 2001
10
US
The Expression On Click you entered as the event property setting produced the following error: The expression you entered has a function name that Microsoft Access can’t find.
*The expression may not result in the name of a macro, the name of a user-defined function, or [event procedure].
*There may have been an error evaluating the function, event, or macro.


The On Click expression is: =HandleButtonClick(1)

When I try to view the module view code an “Error in loading DLL” comes up.
Question: How do I get the dll back or find out where it went. I can't even find out what the dll file name is. When i created a "dummy" switchboard in another database i guess i can cut and paste the HandleButtonClick code from it. But i cannot even get the module view to come up. Gerald Grace
Novice Programmer
 
This is a long shot but... open any module and check the references to see if one of them may be missing.
 
This might also be a long shot, but...;-)

This does sound like the usual "Code gone corrupt" issue, which might be solved by using the following method.

Close all instances of Access

On the Start-menu, chose Run

In the dialog-box, type "msaccess /decompile c:\db1.mdb" (substitute the last part with your path and name)

Close Access again.

Open Access with the file, open a module and use Debug | Compile

Save the prosjekt, quit Access.

Open Access again, and hopefylly, it will work.

What does it do?
An Access project (hopefylly) consists of compiled parts of code. When developing, it is not uncommon for these to become corrupt. This command should remove every compiled bit, so that only your VBA "Text" remains, and can be compiled again.

(You might also create a new database and import all the objects, but forms/reports etc which are corrupt, will not be imported)

Hope it helps... Roy-Vidar
 
Thank you Roy, I am able to use the form after decompiling, but the debug command still doesnt allow the database to be re-compiled correctly - comes up with the same errors after closing out and re-opening. would like to do the second option (copy objects to new database) but the form that i want is the corrupt portion of the database and would like to repair it, if at all possible. Is there a certain way to find out if a reference is missing or not being read? i show the same four references in the project explorer as when the database is good. Any further insights?
Thanks Gerald Grace
Wannabe Programmer :cool:
Please explain steps so I can learn.
Thank You Very Much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top