Change field format in a table

  • Thread starter Help Eliminate Auto Theft
  • Start date
H

Help Eliminate Auto Theft

Win XP Access 2003
I have a table with a field labeled "Unit" and formatted as a number. When
first set up, the Units were assigned numbers. Now, three years later, the
fields are now hyphenated and are entered as xx-xxx (ex. 04-211). I cannot
run a query for the criteria set as 04-211 or ="04-211". I've tried making a
test DB and reformatting the field as text but that doesn't work. I'd
appreciate any help I get.
Thank you.
 
J

Jerry Whittle

HEAT,

Is the field still a number or text? If a number it's probably displayed
like 04-211, but stored as 4211. It could have an input mask or format
setting making it look like 04-211. Try running a query with 4211 as the
criteria.
 
J

John W. Vinson

Win XP Access 2003
I have a table with a field labeled "Unit" and formatted as a number. When
first set up, the Units were assigned numbers. Now, three years later, the
fields are now hyphenated and are entered as xx-xxx (ex. 04-211). I cannot
run a query for the criteria set as 04-211 or ="04-211". I've tried making a
test DB and reformatting the field as text but that doesn't work. I'd
appreciate any help I get.
Thank you.

It's not clear whether you're talking about the *datatype* - Number (whether
integer, double, float, etc.) or Text - or the *format*. The format of a field
controls how it is displayed but not what's stored!

What is the Datatype of the field (the second column in the table design
grid)? What (if anything) is in the Format property of the field (the first
row in the field properties on the lower left of the screen)? How did you try
to change it from number to text? And in what way did it "not work"?
 
T

tizhmslf

Field Size is Long Integer, Data type is number, format property is blank

I only changed the data type to number nad returned no data
 
J

John W. Vinson

Field Size is Long Integer, Data type is number, format property is blank

I only changed the data type to number nad returned no data

04-211 is not a number, and cannot be stored in a number field. You must use a
Text field to store it. In general, Number fields should be used only if
you'll be doing calculations with the number; identifiers such as part
numbers, license numbers, Social Security numbers, zipcodes etc. are best
stored in Text fields.
 

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