David Billigmeier said:
These numbers are unique ID's that I'm trying to match to another table. The
entries in the other table were and always have been formatted as text so
they have their leading zero's still appended. However, in this table they
were formatted as a number at some point so the leading zero's were stripped
off. For example:
When trying to match "12345" to "000012345" Access would call this a
non-match, so I need to attach 4 0's to the "12345" before the query can be
run.
Does that make a little more sense?
Thanks.
Hi Dave,
Yes, that's the kind of info that was needed. You have two choices:
1. Permanently change the values in the Access table. To do this, first
go into table design and change the field from numeric to text. Then,
create and run a query like this:
UPDATE sometable SET somefield = Format(Clng(somefield),"000000000")
2. However, I don't recommend option 1. Far better would be to create
and save a query that selects all the fields from your table EXCEPT, instead
of the ID field, it selects this:
Format(somefield,"000000000")
Then, use the query instead of the table in your comparison operations.
Obviously in the above you would need to replace "sometable" and "somefield"
with the actual names you are using.