473,404 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Why are some of my comboboxes getting populated and other are not?

Any idea why a combobox would not populate?

When the form is opened, it is opened with DOCMD.OPENFORM with selection
criteria to send only those records for a particular dog (dogregnbr).
The query for the rowsource of the combobox works when run from the
query design window.

combobox: cboTrialDt (trial date)
combobox control source: trialclassID (from tblDogTitles)
form record source: tblDogTitles

The query for the combobox rowsource is:

SELECT tblDogTitles.dogtitleID, tblTrials.trialdt
FROM tblTrials INNER JOIN (tblDogTitles INNER JOIN tblTrialClass ON
tblDogTitles.trialclassID = tblTrialClass.trialclassID) ON
tblTrials.trialID = tblTrialClass.trialID;

tblDogTitles has the following fields:
dogtitleID - PK
dogregnbr - FK (key to record in tblDogs)
titleID - FK (key to record in tblTitles)
trialclassID - FK (key to record in tblTrialClass
and then some other fields not involved in this problem.

I have another combobox setup similarly that does get populated
properly. It's control source is titleID.

It's rowsource is:
SELECT tblDogTitles.dogtitleID, tblTitles.title
FROM tblTitles INNER JOIN tblDogTitles ON tblTitles.titleID =
tblDogTitles.titleID;

Thanks for your help.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
5 1383
Sue,
The combos only fill if the data is in list. You have 2 inner joins in
the first sql statement, I'll bet one of the tables does not contain
the trialclassID you are looking for. You can use left or right joins
to see all the data from tblDogTitles.
HTH
Pachydermitis

Nov 13 '05 #2
Hey, Pachydermitis,

Thanks for your reply. I'm still a bit confused. That SQL statement
with the two INNER JOINS does work properly when I run the query while
in the Query Builder screen. It's when it's run within the form that is
doesn't work.

The bound column of the combobox (dogtitleID) and the control source of
the combobox (trialclassID) are both fields that are in the tblDogTitle
record, which is the recordsource of the form. So, I still don't get
it.

Any suggestions on how to get what I want - Trial Date (which is a piece
of data located in the tblTrials table record)?

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3
I probably misunderstood your question. :)
Let's try again - maybe you can clarify a couple things so I can get it
right.
1. Your combo has a source of trialclassID, but your sql would be
placing dogtitleID in it. possible problem?
2. You said the combo doesn't work. Do you get anything in the list,
or is it just not highlighting the one it should
3. You said you want the Trial Date. Do you want the date or the
dogtitleID that goes with the date?
If you ever want to get a single piece of data from a field,
dlookup(field,table,criteria) can be a life saver.

Pachydermitis

Nov 13 '05 #4
Ok ... I'll try to explain.

I want to display a list (continuous forms) of titles that a single dog
has earned while competing in Obedience competitions. I want to display
the following information on each detail line (in the form):

title (for example: "Companion Dog")
title_abbreviation (for example: "CD")
date_title_was_earned
event_where_title_was_earned
host_club_name
trial_number (an event can have more than 1 trial)

Every time a title is awarded to a dog (determined by a procedure that
checks all scores earned by dogs) a new record is written to the
"tblDogTitles" table.

The "date_title_was_earned" is a piece of data in the "tblTrials" table
record. The "tblDogTitles" record has the key to the "tblTrialClass"
record and the "tblTrialClass" record has a key to the "tblTrials"
record.

A dog competes in a Class that is in a Trial that is in an Event. So, I
need to use the "trialclassID" that is saved in the "tblDogTitles"
record to find the record in "tblTrialClass" table and then use the
"trialID" in that record to get me to the "tblTrials" table record that
has the date.

Now, the fun part ... I want to display ALL titles (for the selected
dog) on the form in a 'continuous records' format, not a single record
at a time. I could do the single record at a time design and use
unbound fields and populate the unbound comboboxes easily. But I want
each record to populate and be displayed all at the same time
(visually).

Now to get the Eventname and HostClubName I need to do similar
comboboxes. So, if I can get the date working, I'm sure that I can get
the rest of it to work.

Now, if this is as clear as mud and you want to take a look at the
"solution", I would be willing to zip the mdb file and send it to you to
look at. Just let me know. Thanks.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #5
What a surprise ... I got it to work. I changed the ControlSource of
all those comboboxes to [dogtitleID] (the key of the dogtitle record)
and whadyaknow ... the comboboxes populate properly. Thanks for trying
to help. I really appreciate it.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Phil | last post by:
Hi all I'm new to vb but have a little experience in vba im using vb.net my question is with comboboxes the fist combo box lists the manufactures when a selection is made the second combox...
6
by: Sam | last post by:
Hi, I have a datagrid which has (amongst other stuff) 2 comboboxes columns. So far so good. The trick is that when I select a value in my first column, it must updates the items of the combobox in...
3
by: Randy | last post by:
I have a routine that creates a series of comboboxes, each of which is bound to a common dataview. Everything used to work fine, but now, when I change the value of any of the comboboxes, the...
5
by: Anthony Bollinger | last post by:
I have two tables in a master-detail relationship. When I make a selection in one combobox, how do I have it display the values from a second combobox? Each table has a key and a text value for...
4
by: somacore | last post by:
I'm just learning C# for this huge project at work, so bear with me. This application takes ticket numbers from the user and displays the ticket information in the form. Simple enough. I'm having an...
1
by: Alex | last post by:
Hi, I have a strange question... I have a series of combo boxes being populated by the same dataset, and I've noticed if one is changed then all change as well. I'm using Visual Basic 2005 and...
7
by: phonic | last post by:
Hi, I have about a hundred excel spreadsheets with comboboxes and textboxes which have been populated. Each spreadsheet's format is the same, just the content varies. I want to upload these into...
11
by: KingKen | last post by:
I have a form with a few combo boxes that I would like to have their menu entered dynamically. The first box is department and it holds all the departments in the organization. When I select a...
16
by: Tarheel | last post by:
...You're fast! I appreciate that. Thanks! I look forward to your explanation. One last problem I have on my form is getting all of my comboboxes to update each other. I know how to update...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.