Access database - Fields

Z

ZOYA

How do you separate field contents into two different fields? (opposite of
concatenate)
 
K

KARL DEWEY

You have to tell something about the data in the field.
Is it a name or part-model number field?
Is there a divider within the field like a comma and space or a dash?

Post some sample data and describe where you want it split.

You use Left, Right, and Mid along with InStr to find the divider.
 
Z

ZOYA

OK - I have a name field with last name (Smith, Carl). I want Carl in one
field and Smith in another. How?
 
J

John W. Vinson

OK - I have a name field with last name (Smith, Carl). I want Carl in one
field and Smith in another. How?

Let's say you have a FullName field like this, and you want to put Smith into
the field Surname and Carl into a field named FirstName.

You can run an Update query updating Surname to

Left([Fullname], InStr([Fullname], ",") - 1)

and Firstname to

Trim(Mid([Fullname], InStr([Fullname], ",") + 1))
 
Top