Question Undefined Function "UCase" in expression (1 Viewer)

laxster

Registered User.
Local time
Today, 08:12
Joined
Aug 25, 2009
Messages
145
Hi all,

One of my users is getting an error message 'Undefined Function "UCase" in expression' pop up. In the past, when someone had this issue, I'd tell them to check the references in VB and unselect anything that says "MISSING" which has fixed the issue in every case, until now.

This time, there is no "MISSING" in the list. What needs to be selected so that the file can be used again? This is happening to users who are upgrading from 2003 to 2010.

Thanks
 

the_net_2.0

Banned
Local time
Today, 08:12
Joined
Sep 6, 2010
Messages
812
do they have the appropriate DLLs on their machines?? do they have the access library dll, the engine dll and the vba dlls??

does it happen right when the apps are opened?? as in, are the breaks occurring on the first lines of vba that is scheduled to run?? if so, it might be the code or a library issue instead of the function or something small.

usually the MISSING: issue takes care of things like this. have they tried manually compiling it again??
 

laxster

Registered User.
Local time
Today, 08:12
Joined
Aug 25, 2009
Messages
145
I keep the database file pretty well locked down -- where someone would have to hit the shift key when opening to see behind the scenes. Usually a security message pops up where you would then hold down the shift key, but he doesn't get that, so I'm not able to help him compile.

Is there another, simpler way to allow someone access to Visual Basic for Apps so he can compile? Previously I told him to start a new database to check for the references. Perhaps that's the issue? A security setting I'm missing?
 

boblarson

Smeghead
Local time
Today, 06:12
Joined
Jan 12, 2001
Messages
32,059
On the trouble machine, try unchecking the DAO reference (in 2007 it would be Microsoft Office Access 12.0 Database Engine Object Library) and then close the dialog (if it will let you) and then reopen and recheck it. Start the db over and see if it works.
 

vbaInet

AWF VIP
Local time
Today, 14:12
Joined
Jan 22, 2010
Messages
26,374
If all else fails just use VBA.UCase() and that should solve the reference problem.

You should also consider using the format property greater than (>) to make the value of a control upper case.

Also, if you create a new database shell and import all the objects into that new shell, then set the references again it should also fix the problem.
 

motleyjew

Registered User.
Local time
Today, 09:12
Joined
Jan 11, 2007
Messages
109
I could be wrong, but if they have a "Missing Reference" and you have them uncheck it, you still may need to set the proper reference if code is running that requires that reference. This happens a lot to me with the Microsoft Excel 12.0(2007) reference when someone with Microsoft 11.0 (2003) trys to open it. It might work for them if you have them set it to the proper reference.

Gregg
 

boblarson

Smeghead
Local time
Today, 06:12
Joined
Jan 12, 2001
Messages
32,059
This happens a lot to me with the Microsoft Excel 12.0(2007) reference when someone with Microsoft 11.0 (2003) trys to open it.

Re:The above quote -

In that case, I would move to late binding. Then there is no reference and hence no problem moving between the two versions.
 

motleyjew

Registered User.
Local time
Today, 09:12
Joined
Jan 11, 2007
Messages
109
I should have known there was a solution for that. I'll look up late binding and try that out.,
Thanks
Gregg
 

Users who are viewing this thread

Top Bottom