Text field reporting incorrectly?

chappy68

Registered User.
Local time
Today, 11:29
Joined
Aug 15, 2011
Messages
76
Strange situation I have solved but don't know why I had the problem. Just want clarification so I don't have this happen again in the future.

Using Access 2007.

I have a table "StoreInfo" that stores the store number, store address, etc as text fields. I then have created a query gathering this data, specifically store number and address as separate fields. When I run the query, the store number and address are correct. When I use that same query in a report, I have one specific store where all data appears on the report correctly except the store number. The store number is "007" but appears on the report as "137". I was able to correct the problem by changing the store number to eliminate the leading 0's.

Since the field is a text field, I just assumed I would not have any sort of problem with the leading 0's. Once I changed the store number to 107, the problem disappeared.

Can anyone explain why this is happening? I just don't understand. I don't want this to happen in other spots within my database.
 
If the address is Bond Street - perhaps they are trying to disguise themselves:)

But seriously, preceding zeros in a string should not be a problem - is it possible you had a none printing character in there somewhere?
 
But seriously, preceding zeros in a string should not be a problem - is it possible you had a none printing character in there somewhere?

I don't think it is a non printing character. I deleted the offending record and re-entered. Same problem. I placed a dot in front of 007 and it worked also. Very strange situation. Still unable to determine WHY is didn't work.
 
Only other thought I have is you have set some formatting on the control?
 

Users who are viewing this thread

Back
Top Bottom