Help with a number field converted to text filed

D

Dave

In a query I want to take a Table Field - Employee Number and covert it to a
new Field EmplID which is text.

I wnat the Field records to be 6 places.

I have not been able to figure out how to input zeros.

Ex 123456 > "123456"

Ex 3456 > "003456"

Can you help with this?

Thanks Dave
 
B

Brendan Reynolds

UPDATE tblTest SET tblTest.TestText = Format$([TestNum],"000000")
WHERE (((tblTest.TestNum) Is Not Null));

Replace 'tblTest' with the name of your table, 'TestNum' with the name of
your employee number field, and 'TestText' with the name of your text field.
 
F

fredg

In a query I want to take a Table Field - Employee Number and covert it to a
new Field EmplID which is text.

I wnat the Field records to be 6 places.

I have not been able to figure out how to input zeros.

Ex 123456 > "123456"

Ex 3456 > "003456"

Can you help with this?

Thanks Dave

NewID:Format([OldID],"000000")
 
D

Dave

Thank you!

I am off and running :)

Dave

Brendan Reynolds said:
UPDATE tblTest SET tblTest.TestText = Format$([TestNum],"000000")
WHERE (((tblTest.TestNum) Is Not Null));

Replace 'tblTest' with the name of your table, 'TestNum' with the name of
your employee number field, and 'TestText' with the name of your text
field.
--
Brendan Reynolds (MVP)

Dave said:
In a query I want to take a Table Field - Employee Number and covert it
to a new Field EmplID which is text.

I wnat the Field records to be 6 places.

I have not been able to figure out how to input zeros.

Ex 123456 > "123456"

Ex 3456 > "003456"

Can you help with this?

Thanks Dave
 
D

Dave

Thank you for the help!!


fredg said:
In a query I want to take a Table Field - Employee Number and covert it
to a
new Field EmplID which is text.

I wnat the Field records to be 6 places.

I have not been able to figure out how to input zeros.

Ex 123456 > "123456"

Ex 3456 > "003456"

Can you help with this?

Thanks Dave

NewID:Format([OldID],"000000")
 

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