Compile errors in Access 2003

G

Guest

A DB system developed in earlier versions of Access was most recently running
in Access 2000. After buying a new computer and upgrading to Office 2003,
most or all of my custom functions fail to compile. The symptoms are:

-- Form fields that call these functions show #Name? errors.

-- A form action that calls one of my functions fails with "There was
an error compiling this function. The Visual Basic module contains a syntax
error."

-- If I run a query that calls one of my functions, it fails with
"Complie error. in query expression '<FunctionName>()'."


In my attempts to isolate the problem, I ended up creating a new function
with the following code:

Function ttemp()
ttemp = 0
End Function

Then I created a new query with only the one field: "Expr1: ttemp()".
Running this yields: "Complie error. in query expression 'ttemp()'."

So it looks like I pretty much can't compile anything at all. Anyone know
what's going on? Thanks for any guidance you can offer.

Regards,
Marshall Burns
www.Ennex.com
 
D

Douglas J. Steele

The first thing I'd recommend is checking your References collection.

Open any code module (or get into the VB Editor using F11). Select Tools |
References from the menu bar. Examine all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile, on the Debug menu), go
back in and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top