extacting first name from a field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

have a field that has first name and first initial. I want to only extract
the first name in a query.

So if I have John R. I only want to extract John. In a Query I wrote
this syntax: =left([FirstName], Find(" ",[FirstName]))

But the Find doesn't seems to exist in Access (it does in Excel). I also
tried this with substituting Find with Match.. no luck there either.
How would I do this?

Thanks
 
have a field that has first name and first initial. I want to only extract
the first name in a query.

So if I have John R. I only want to extract John. In a Query I wrote
this syntax: =left([FirstName], Find(" ",[FirstName]))

But the Find doesn't seems to exist in Access (it does in Excel). I also
tried this with substituting Find with Match.. no luck there either.
How would I do this?

Thanks

In a new column on the query QBE grid:

FirstOnly:Left([Combined],InStr([Combined]," ")-1)
 
fredg said:
have a field that has first name and first initial. I want to only extract
the first name in a query.

So if I have John R. I only want to extract John. In a Query I wrote
this syntax: =left([FirstName], Find(" ",[FirstName]))

But the Find doesn't seems to exist in Access (it does in Excel). I also
tried this with substituting Find with Match.. no luck there either.
How would I do this?

Thanks

In a new column on the query QBE grid:

FirstOnly:Left([Combined],InStr([Combined]," ")-1)

The problem comes in, of course, when you have "Mary Ann B." in the field.
Which is why the data should NOT be stored that way in a RDBMS such as
Access.
 
Back
Top