Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

access splitting imported

Forum home » Delegate support and help forum » Microsoft Access Training and help » Access - splitting imported data

Access - splitting imported data

ResolvedVersion 2007

Greg has attended:
Access Introduction course
Access Intermediate course
Access Advanced course

Access - splitting imported data

I have a table of imported data which includes one column of 8 numbers which I need to split. I want to create a seperate column in access (in the original table if possible) of the 5 numbers on the left only as this represents a seperate identifier which I would use for grouping up of clients. How do I do this??

RE: Access - splitting imported data

Hi Greg,

Thank you for your question.

As long as the field is a text data type then you can use the left function within Access.

I suggest you could try the following:

1. Before you do anything take a copy of your table just in case as back up.

2. Create a query based on your copied table and include all the fields.

3. Save the query with a name.

4. Click into the next available blank Field Name cell and click the wand up on your toolbar (expression builder or Build).

5. Type the name of the new field followed by a colon.

6. Below is the formula you need:

new field name: left([Name of the field with the 8 numbers],5)

This will give you the first five characters from the left of the field.

Then change the query type to a Make Table query and specify a new table name that will include all the original data plus the extra column.

Run the query using the red exclamation mark and accept the You are about... and paste ... message boxes. Close and save the query and then go and open the new table that was generated.

Try this and tell me how you get on.

Regards

Simon

Thu 1 Apr 2010: Automatically marked as resolved.

Access tip:

Prefixed Autonumbering

When using Date Type = Autonumber as a primary key, clients may require autonumbering to be prefixed with a letter.

For example, P001, where P is the prefixed letter

Instructions
Step 1. Create Field Name
Step 2. Set Data Type to Autonumber
Step 3. Within Field Property General tabsheet,
enter Format property as [backslash]P000



View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.12 secs.