First problem in Access - calculation in a query

M

Mervyn Thomas

I am trying to get a calculated field in a query such as InitialName:
=Left([First Name],1) and I always get a return "undefined function "Left"
in experession. Can anyone get me started?
 
J

jmonty

Try making sure the field names do not contain spaces, use
underscores instead.
(i.e. change First Name to First_Name)
Second do not use the = sign.
Just type the alias: function like this:

InitialName: Left([Table1].[First_Name],1)

Where Table1 is your table name, obviously.
If you are still having trouble with the Left function use
the Mid function instead.

InitialName: Mid([Table1].[First_Name],1,1)

Search Access help (index) for Left and Mid functions for
further explanation. Hope this helps.

-----Original Message-----
I am trying to get a calculated field in a query such as InitialName:
=Left([First Name],1) and I always get a
return "undefined function "Left"
 
J

John Vinson

I am trying to get a calculated field in a query such as InitialName:
=Left([First Name],1) and I always get a return "undefined function "Left"
in experession. Can anyone get me started?
This appears to be the very common References bug. Open any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.
 
M

Mervyn Thomas

Many thanks - I did successfully get Left to work in a completrely new
database so I will try to follow your instruction on the db causing the
problem which did have the fieldname as one word (previous reply to group)
Thanks
Mervyn

John Vinson said:
I am trying to get a calculated field in a query such as InitialName:
=Left([First Name],1) and I always get a return "undefined function "Left"
in experession. Can anyone get me started?
This appears to be the very common References bug. Open any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
.DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.
 

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