The part of the database I'm having this problem with is for lesson plans. I
work at a Canadian Forces trade school. I have very little training on
Access, so if I say anything stupid, give you too much/not enough/wrong info,
or don't understand something . . . my apologies in advance.
I built the main form with a series of 4 unbound combo boxes that use VBA to
limit subsequent combo boxes. The sources are a query (qryLessonPlans) that
accesses three different tables. The first combo selects a course from table
#1 (CrseData), then the 2nd and 3rd boxes select phase of the course and main
topic from table #2 (POData), and the last box selects a specific subject
from table #3 (EOData). These selections result in an unbound list box that
shows a unique subject code from table #3. This code is the Master Field.
The SQL for the list box is:
SELECT DISTINCT qryLessonPlans.eoPOEOID
FROM qryLessonPlans
WHERE (((qryLessonPlans.cdCrse)=[Combo16].[value]) AND
((qryLessonPlans.poPhase)=[Combo18].[value]) AND
((qryLessonPlans.poPONumber)=[Combo20].[value]) AND
((qryLessonPlans.eoEONumber)=[Combo22].[value]));
The subform in question (sbfPresentations) is based on a query
(qryPresentations). The subforms's Child Field is a unique lesson code,
which uses the same subject code as is in the Master Field, but adds 1-5
characters at the end. The SQL for qryPresentations is:
SELECT [qryLessonPlans].[eoPOEOID], [10tblLessons].[lTP],
[10tblLessons].[lTPDesc], [10tblLessons].[lLessonID],
[10tblLessons].[lLessonName], [10tblLessons].[lLessonDesc],
[10tblLessons].[lPeriods], [10tblLessons].[lSlides],
[10tblLessons].[lDatePost], [10tblLessons].[lDateReview],
[10tblLessons].[lAuthor], [10tblLessons].[lReviewer],
[10tblLessons].[lNotes], [10tblLessons].[lSlide],
[10tblLessons].[lLessonLink], [10tblLessons].[lDocLink],
[10tblLessons].[lZipLink]
FROM (05tblEOData INNER JOIN qryLessonPlans ON
[05tblEOData].[eoPOEOID]=[qryLessonPlans].[eoPOEOID]) INNER JOIN 10tblLessons
ON ([05tblEOData].[eoPOEOID]=[10tblLessons].[eoPOEOID]) AND
([qryLessonPlans].[eoPOEOID]=[10tblLessons].[eoPOEOID]);
I tried changing the opening from SELECT to SELECT DISTINCT, but there are
memo, OLE, and hyperlink fields. I tried removing those fields from the
query and having the form draw them straight from the table, but they won't
play that way.
Help?
Craig.