Link to home
Create AccountLog in
Avatar of codequest
codequest

asked on

Sort on dlookup field in form

I've got a form with a field populated by a dlookup.  There's an underlying field in the related table, but I'm not using that (I could).

Right click on the field does not show sort ascending, sort descending, select etc.  Ok, I kinda get it, it's a dlookup, so it's not simple to figure out how to do the sort.

1)  Will I run into the same restriction if I attempt to do an "OrderBy" on the field in vba?

2)  I assume that if instead of filling the form field with Dlookup I insert into the underlying table using sql, and then requery the form (which I have to do anyway, when the source field - in another form - changes), the sort should work?

Thanks!

ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of codequest
codequest

ASKER

Thanks for the input.   I'll try it and post back.