Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto change from number to text

Status
Not open for further replies.

NoteSmith

Technical User
May 16, 2000
12
US
I am preparing a table for export to fixed with ASCII file and need to automatically change a table field property from number to text. I have tried macros and update queries but have been unsuccessful. I prefer using macros and queries to code because I'm not that good with VB.
Any suggestions?

Thanx
Dave
 
Hi Dave!

In the Field line of the QBE type NewName: Format([MyTable]![MyNumberField,], "000000"). If you are only using one table in the query you can leave the [MyTable] out. Using the "000000" will set the width to six characters and add in leading zeros. Of course you will only use this if you want leading zeros (you can make it any length you want). In SQL the format would be Format([MyTable]![MyNumberField,], "000000") As NewName.

hth
Jeff Bridgham
 
Or at the beginning of another column type the following, replacing IntegerValueColumn with whatever the name of you field is.

TextFromNumericValue:CStr([IntegerValueColumn])

Steve King Growth follows a healthy professional curiosity
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top