Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MS Access 2003 Combo Box

Posted on 2012-04-04
11
Medium Priority
?
275 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
[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
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 40

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 40

Accepted Solution

by:
als315 earned 2000 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

650 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