Combobox not getting populated. Why?

SueBwork

Registered User.
Local time
Today, 17:27
Joined
Apr 22, 2005
Messages
21
Any idea why a combobox would not populate? :confused:

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;

After explaining why this is happening, do you have a suggestion for how I can get the trial date (trialdt) from tblTrials to display for the current dogtitle record (tblDogTitles)?

Thanks.
Regards,
SueB
 
The method I use to constrain combo RowSources is to use a control from the form as selection criteria.
Select ...
From YourTable
Where somefield = Forms!YourForm!somefield;
 

Users who are viewing this thread

Back
Top Bottom