simple query to update another field based on telephone numbers doesn't work all the time (1 Viewer)

mkdrep

Registered User.
Local time
Today, 14:17
Joined
Feb 6, 2014
Messages
176
I have a simple query which joins 2 tables by their telephone numbers. If the telephone numbers are the same, it copies the [Architect].[AIA-ID] field in table 2 (which is an AutoNumber field) into the 2nd table, [1Firms-ADD New to Firms On Project].[ArchID] field (which is NOT an AutoNumber field).

What's confusing is that the 2nd table is not always updated, when the (2) telephone numbers are the same. So the question is why do some of the records update and some don't when the telephone numbers are identical?

Thanks in advance for any suggestion
 

Attachments

  • Telephone_query.jpg
    Telephone_query.jpg
    55.2 KB · Views: 63

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:17
Joined
May 7, 2009
Messages
19,245
a simple "space" or unseen character on either fields can make the join fail.
 

Gasman

Enthusiastic Amateur
Local time
Today, 19:17
Joined
Sep 21, 2011
Messages
14,310
Are they the same though?, could be a leading, trailing space, hidden character.?
Have you checked the length of each?
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:17
Joined
Jan 23, 2006
Messages
15,379
As arnelgp and gasman have suggested, there may be a space, hidden char etc.
Find a couple of "errors you have identified" and do more analysis.
Check lengths. Even debug.print the Asc("character to be checked") to see exactly what Access sees.
 

mkdrep

Registered User.
Local time
Today, 14:17
Joined
Feb 6, 2014
Messages
176
Thanks for the suggestions. I'll monitor this and see if that's the problem
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:17
Joined
Feb 19, 2002
Messages
43,276
Are the phone numbers formatted? It is possible that the formatting is embedded in one but part of the input mask for the other.
 

Users who are viewing this thread

Top Bottom