473,569 Members | 2,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.do gtitleID, tblTrials.trial dt
FROM tblTrials INNER JOIN (tblDogTitles INNER JOIN tblTrialClass ON
tblDogTitles.tr ialclassID = tblTrialClass.t rialclassID) ON
tblTrials.trial ID = tblTrialClass.t rialID;

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.do gtitleID, tblTitles.title
FROM tblTitles INNER JOIN tblDogTitles ON tblTitles.title ID =
tblDogTitles.ti tleID;

Thanks for your help.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
5 1389
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,t able,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_abbreviat ion (for example: "CD")
date_title_was_ earned
event_where_tit le_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
"tblDogTitl es" table.

The "date_title_was _earned" is a piece of data in the "tblTrials" table
record. The "tblDogTitl es" record has the key to the "tblTrialCl ass"
record and the "tblTrialCl ass" 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 "trialclass ID" that is saved in the "tblDogTitl es"
record to find the record in "tblTrialCl ass" 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
1929
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 populates with the available products and when a selection is made here then next combobox will be populated with model numbers and so on can someone...
6
1258
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 the second column for the same row. In the first column, comboboxes contain names of tables. In the second column, comboboxes contain names of...
3
1858
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 value in ALL of the comboboxes changes to the new value. I have boiled down the code to the simplest lines and placed it on its own form, but I still...
5
4046
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 each record. I don't yet see the way to update the list of values in the second combobox. Thanks for any input, Tony
4
1805
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 issue though with the comboboxes. Since I want users to be able to update the tickets (and this works, so far except on these stupid boxes), the...
1
3664
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 writing a Winform app, and below is how I'm binding the dataset to the combobox object: cbTotalCurrency.DataSource = CurrencyDataset.Tables(0)...
7
2229
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 access, and I'm assuming the only way to do this is via VBA. How do I do this? How can I take the value of a combobox from an excel spreadsheet, and...
11
12079
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 department in this box I would like the second combo box, which is "user" to be populated with only the users in this department. As it is right now...
16
2379
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 them as a cascade (i.e. Region updates Country which updates State which updates City) but I would like them to be interdependent (i.e. if I select a...
0
7701
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7677
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7979
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.