Undefined function 'Right' in expression

J

Jess

Hi!
I am trying to get a 8 digit number string in the [Date]
field (ex. 19960323) into a date format. To do this I am
trying to use the Right and Mid function to pick out the
month and dates into different fields. However, when I
enter in LastNumbers: Right([Date],2) into the query
field, I get the error message: Undefined function 'Right'
in expression. I have checked with my MSAccess help book
and this looks like it should work, however I'm using MS
Acess 2002. The same error message appears for the Mid
function. any suggestions?
 
B

Bas Cost Budde

Jess said:
Hi!
I am trying to get a 8 digit number string in the [Date]
field (ex. 19960323) into a date format. To do this I am
trying to use the Right and Mid function to pick out the
month and dates into different fields. However, when I
enter in LastNumbers: Right([Date],2) into the query
field, I get the error message: Undefined function 'Right'
in expression. I have checked with my MSAccess help book
and this looks like it should work, however I'm using MS
Acess 2002. The same error message appears for the Mid
function. any suggestions?
Check your References. Chances are something is messed up.

Type Ctrl-G so the immediate window appears
From the menu Tools choose References
Uncheck any marked as MISSING
 
T

Tim Ferguson

However, when I
enter in LastNumbers: Right([Date],2) into the query
field,

The other post about missing references was on the button.

As an extra point, though, I would really rethink the idea of using
reserved words as field names. "Date", "Text", "Name" and so on all have
special meaning to Access, VBA or SQL (or to more than one of them) and you
are almost guaranteed to run into a bug if you use them for variables or
field names too. Use something more descriptive like "DateOfAssignment", or
"FullName" or "TextualDescription" instead. You can find out reserved words
by looking in help.

B Wishes


Tim F
 

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