Solved

MS Access 2003 Combo Box

Posted on 2012-04-04
11
266 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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
 

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

This article will show you how to use shortcut menus in the Access run-time environment.
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

777 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