Solved

MS Access 2003 Combo Box

Posted on 2012-04-04
11
264 Views
Last Modified: 2012-04-05
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
0
Comment
Question by:avlna
  • 5
  • 4
  • 2
11 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37806667
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
0
 

Author Comment

by:avlna
ID: 37806701
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
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37806741
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37806771
<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?
0
 

Author Comment

by:avlna
ID: 37806784
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.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:avlna
ID: 37806814
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.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37806918
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)
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37807107
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...
0
 
LVL 39

Expert Comment

by:als315
ID: 37807608
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
0
 

Author Comment

by:avlna
ID: 37807930
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?
0
 
LVL 39

Accepted Solution

by:
als315 earned 500 total points
ID: 37809490
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.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now