Where Condition on Combo Box Lookup?

R

Robert T

Hello:

I'm relatively new to Access 2003 and I'm designing a tradtional Many to
Many application with tblClasses, tblStudents, and tblLink as the three main
tables. On the Class registration form I have a combo box lookup on
tblClasses that incoroporates a drop down list of all classes. It works well,
however, I realize the list of classes will eventually become very large and
cumbersome.

It would be nice to reduce the number of classes in the drop down list by
putting a a "Where" condtion such as > Date(). After all, we're not going to
register students for classes that were already completed.

Is this possible? And if it is, how would I do such?

Thanks,
Robert
 
J

John Vinson

It would be nice to reduce the number of classes in the drop down list by
putting a a "Where" condtion such as > Date(). After all, we're not going to
register students for classes that were already completed.

Is this possible? And if it is, how would I do such?

Not just possible... easy.

Create a Query based on the classes table. Put whatever criteria you
like on it. It's probably a good idea to sort it appropriately
(alphabetically by classname?)

Use this query, rather than the Classes table, as the Row Source for
your combo box.

John W. Vinson[MVP]
 
R

Robert T

Hi John:

That does indeed sound fairly easy. Thanks a lot John, I'll let you know if
I have any problems.

Robert

[Create a Query based on the classes table. Put whatever criteria you
like on it. It's probably a good idea to sort it appropriately
(alphabetically by classname?)

Use this query, rather than the Classes table, as the Row Source for
your combo box.
 
R

Robert T

John:

That tip was right on the money. It was just as easy as you described and so
far it's working perfectly.

Thanks,
Robert
 
Top