A problem with a simple query MS Access 10

I have a simple query that I use to populate a listbox with transactions, selecting the required account by preloading a property.  It will select one account but not the other.

I have attached a small simple test database to demonstrate the problem.

This is driving me mad and I would greatly appreciate any help I can get.

Thanks in advance,

Clive
Clive BeatonAccess DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Clive BeatonAccess DeveloperAuthor Commented:
DB attached.
Database1.accdb
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
There is something wrong with the data in the 2/3 values in the combo

see image - note Spaces or what ever they aredata
0
Clive BeatonAccess DeveloperAuthor Commented:
Thanks, Joe.

Can you suggest any way of discovering what the leading characters are?  Standard Access things I've tried, don't throw any light.
0
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
more data
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Well ... not sure that is the problem.  Notice the combo  box account selected above is not in Import table.  So that is the actual problem
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
The spaces are WEIRD.  In the Immediate Window, Trim removes the Spaces ... so they must be spaces.
Not sure what is going on
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Two out of three of the numbers in the combo are not in the Import table.
So ... it's actually working correctly ...
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
This works ... when all combo values are in the Import Table.
Database1MX01.accdb
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Clive BeatonAccess DeveloperAuthor Commented:
Thanks, Joe.

I changed the query on the account field to read the accounts table, and one of the account numbers was corrupted.  Fixed that and now all is good.

Clive
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Cool.  Don't forget to close the question :-)
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
OP confirmed that  my solution worked
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.