• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 36
  • Last Modified:

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
0
CRB1609
Asked:
CRB1609
  • 8
  • 3
1 Solution
 
CRB1609Access DeveloperAuthor Commented:
DB attached.
Database1.accdb
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
 
CRB1609Access 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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
more data
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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 MVP, Access and Data Platform)Commented:
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 MVP, Access and Data Platform)Commented:
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 MVP, Access and Data Platform)Commented:
This works ... when all combo values are in the Import Table.
Database1MX01.accdb
0
 
CRB1609Access 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 MVP, Access and Data Platform)Commented:
Cool.  Don't forget to close the question :-)
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
OP confirmed that  my solution worked
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 8
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now