Undefined function 'Right' in expression

  • Thread starter Thread starter Jess
  • Start date Start date
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?
 
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
 
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
 
Back
Top