Lookup field versus lookup table?? and sorting??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using Access 2000.
Thought I understook lookups until I read some of the posts.
tables>Fields layout:
Classes>classID(PK), classname, desc1, desc2, hours
Students>StudID(PK), fname, lname, etc, etc
ClassAttend>TrxID(PK), Student(FK), Class(FK),registered(Y/N), completed(Y/N)

I used the lookup wizard in the ClassAttend table to direct the Student
field to look to the Students.StudID, and the Class field to classes.ClassID.
I have a form for entering my data and teh lookup has worked fine until
recently. I have been typing teh first few characters of teh class name in
the form to bring up the correct record. Recent additions have resulted in
multiple classes that have similar names, and OF COURSE they are not
together.

?? Is there a simple way to sort the lookups IN THE FORM so that they
dsiplay in alphabetrical name order rather than teh default PRIMARY KEY
order? I did try simply sorting the relevalet table on the name field, but
alas that seems to have no effect on the lookup display in the form. And I
have not FOUND a way to sort said lookup from the form DESIGN view.

Suggestions are appreciated, especially if they do not involve VBA coding.
Just have not gotten that far yet!
 
You can remove the lookup properties of the field in your table. Then, on
your form, set the sorting of the combo box using the Row Source property.

SELECT ClassID, ClassName
FROM Classes
ORDER BY ClassName;

Try to avoid any use of lookup fields in tables.
 
Back
Top