Access database - Fields

  • Thread starter Thread starter ZOYA
  • Start date Start date
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.
 
OK - I have a name field with last name (Smith, Carl). I want Carl in one
field and Smith in another. How?
 
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))
 
Back
Top