I am trying to run a query from a table created in Access 2000 and a linked
table created in Access 97. We cannot change the data or design of anything in
the Access 97 database. The Access 97 table has the leading zeros (text field).
The account numbers we have provided from another source do not have leading
zeros (text field also, defined the same), and will not allow us to join on
those two fields. Do you know of a process that would trim off leading zeros?
I was thinking of a query that brings in the data from the Access 97 table and
trims off the leading zeros. Is there such a thing?
After re-reading your post, I see that my suggestion technically violates the
"cannot change the data or design of anything", so I should have, at least,
suggested that you add a joinable column to your query to:
1) Provide a column based on the value of the field with the leading zeros -
using Val([FieldName]) - to allow joining to the field in the other table with
no leading zeros, or
2) Provide a column based on the field in the table with no leading zeros,
formatted to include the leading zeros - using Format([FieldName],
"0000000000") - using the appropriate number of zeros in the format to match the
length of the entries in the field that contains the leading zeros. Of course,
this would only work if the length of all the entries in that field are of the
same length.