MS Access 2003 Combo Box

Below is just a brief explanation of the problem I am having but I have attached a Word document with an extensive explanation and graphics to make it easier.

I have a combo box on a main form that I want to find records according to the items in the list.  This is a main form with two subforms (one on the other).  My combo box will not find all of the records listed.

I am using MS Access 2003 on Windows XP.
ComboBoxProblem.doc
avlnaAsked:
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.

Jeffrey CoachmanMIS LiasonCommented:
It would have been much more useful if you posted a sample of this database...

Sample database notes:
1. Back up your database(s).
2. Combine the front and back ends into one database file.
3. Remove any startup options, unless they are relevant to the issue.
4. Remove any records unless they are relevant to the issue.
5. Delete any objects that do not relate directly to the issue.
6. Remove any references to any "linked" files (files outside of the database, Images, OLE Files, ...etc)
7. Remove any references to any third party Active-x Controls (unless they are relevant to the issue)
8. Remove, obfuscate, encrypt, or otherwise disguise, any sensitive data.
9. Compile the code. (From the VBA code window, click: Debug-->Compile)
10. Run the compact/Repair utility.
11. Remove any Passwords and/or security.
12. If a form is involved in the issue, set the Modal and Popup properties to: No
    (Again, unless these properties are associated with the issue)
13. Post the explicit steps to replicate the issue.
14. Test the database before posting.

In other words, ...post a database that we can easily open and immediately see and/or troubleshoot the issue.
And if applicable, also include a clear graphical representation of the *Exact* results you are expecting, based on the sample data.

JeffCoachman
avlnaAuthor Commented:
I just started working on this and everything in it pertains to this form.

I want to be able to choose any item from the combo box on the main form and have the forms update with that information.  Right now those items with the same employee, session and date type but with different time do not appear.
Coaching.mdb
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.

Jeffrey CoachmanMIS LiasonCommented:
<My combo box will not find all of the records listed.>
The combobox on the main form (Combo51) DOES list all the records.
There are 5 records, and the comboox displays 5.

Am I missing something?
avlnaAuthor Commented:
I thought about putting another combo box on the Calls subform but the customer would like just one so I am looking into that first.
avlnaAuthor Commented:
There are five records and if you pick John Doe with the time of 11:00 you get that record but if you pick John Doe with the time of 11:15 it stays on the 11:00 record.  You have to use your record navigation buttons to go to the 11:15 record.  This is just test data but when the real data is added there will be many more calls on the same day for the same session and the customer doesn't want to look through them...or choose them from another combo box if it can be prevented.
Jeffrey CoachmanMIS LiasonCommented:
Then this is an issue with the way you have designed this system.
The Sesion ID (11)  is duplicated in the recordsource for the main form (for both John Doe records...)
This is probably because the Recordsource for the main form is a query with other joined tables.
I don't have time to go into that, but in the most basic sense, you should be keying on lngEmployeeSessionID filed in the tblEmployeeSessions "Table"
(where the lngEmployeeSessionID is not duplicated)
Jeffrey CoachmanMIS LiasonCommented:
I am not quite sure your tables are designed and related correctly to give you what you want.
The relationships imply:
EmpSession-->SessionTypeDate-->EmpSessionCall

...Yet the form seems to want to convey:
EmpSession--->SessionType-->TypeOfCall

it is also not clear what the distinction between a Call and a Session is

So either the form, or the Tables design/relationships needs to be rethought...

Let's see what other Experts may post...
als315Commented:
I don't like your logic. Seems it was changed during this project :)
Test this sample. You can remove (or hide) additional fields. They were added only for testing.
Coaching.mdb
avlnaAuthor Commented:
Thank you, that is exactly what I want it to do.  Did you just add the text box with =Combo51.COlumn(7) and nothing else?  I didn't find anything else.

Should the bound column have been the dtmCallTime which was column 7??  Having a main form and two subs is confusing me.

I just started working on this and had a hard time trying to get the tables/relationships correct but I want them to be right or I will be having a hard time with everything.  Do you not like the logic of the tables/relationships or just the combo box?
als315Commented:
Text box is only for testing.
I've added lngSessionCallsID to Combo51, Afterupdate event was changed (it is filter now). Links between your forms were also changed.
I think you can change your forms. May be you don't need subforms at all.

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
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.