Where is the MDE installed?
Is it in a trusted location?
If not, the VBA may be disabled.
Trusted locations are defined under:
Office Button | Access Options | Trust Center | Trust Center Settings
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Keith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have encountered a very peculiar set of errors that occur in a weird
> way. I hope someone can shed some light on this situation. Here are
> the facts:
>
> THE ERROR: function error on queries which include basic vba functions
> such as right, mid, etc. I tested with a simple query using a right()
> function in a user-defined field. No problem in mdb, error in mde.
>
> * The error only occurs when THE MDE FORM of the database is executed.
> The same database in mdb form does not throw any errors. Not only does
> it not throw any errors from the mdb format, the functions work
> properly. Because these errors occur in queries, there is no way to
> trap the error incode.
> * The database (mdb & mde) is version 2000.
> * The error only occurs when using Access 2007 on Vista Enterprise. I
> have tested it on an XP machine with Access 2007 and the error does
> not occur. (I should note that the XP machine has both 2000 and 2007
> installed while the Vista machine only has Access 2007 installed.)
> * There are no missing references.
>
> I suspect it has something to do with references. Yet I deliberately
> checked and it appears that all references are correct. (There are no
> missing references.) I have a test routine built into the mde which
> programmatically checks all references and all come up correctly.
>
> HELP!!
>