Solved

A problem with a simple query MS Access 10

Posted on 2016-08-01
11
29 Views
Last Modified: 2016-08-22
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
Comment
Question by:CRB1609
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 3
11 Comments
 

Author Comment

by:CRB1609
ID: 41738448
DB attached.
Database1.accdb
0
 
LVL 75
ID: 41738459
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
 

Author Comment

by:CRB1609
ID: 41738470
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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 75
ID: 41738473
more data
0
 
LVL 75
ID: 41738474
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
 
LVL 75
ID: 41738476
The spaces are WEIRD.  In the Immediate Window, Trim removes the Spaces ... so they must be spaces.
Not sure what is going on
0
 
LVL 75
ID: 41738480
Two out of three of the numbers in the combo are not in the Import table.
So ... it's actually working correctly ...
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 500 total points (awarded by participants)
ID: 41738481
This works ... when all combo values are in the Import Table.
Database1MX01.accdb
0
 

Author Comment

by:CRB1609
ID: 41738589
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
 
LVL 75
ID: 41739415
Cool.  Don't forget to close the question :-)
0
 
LVL 75
ID: 41764165
OP confirmed that  my solution worked
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question