Hi
Access 2002/2007
WindowsXPPro Sp2
I have a form and subform arrangement. I have a number of comboboxes on my subform. I want to be able to sort the form based on these comboboxes. My intention is to permit this using the built in context menus (e.g. right-click on combobox and choose "Sort A to Z").
The Form is populated by an SQL statement:-
Code:
SELECT * FROM My_Tbl_A WHERE xxx=yyy etc
The comboboxes themselves are also populated by an SQL statement e.g.
"My_Parent_Category_Combobox" has a Rowsource of:-
Code:
SELECT Item_Name As Category, Item_Unique_No, Item_Version etc FROM My_Tbl_B
WHERE Item_Version=xxx etc
It has a Controlsource of (TBL_A's) Parent_Unique_No
It has a BoundColumn set to (TBL_B's) Item_Unique_No column.
This box is populated and scrolls to the correct Item_Name (as Category) perfectly...
The problem
---------------
When a user elects to sort the Form using My_Parent_Category_ComboBox, Access throws up an "Enter
Parameter Value" box for
Code:
[LookUp_My_Parent__Category__Combobox].[Category].
Note that Access uses the combobox name as the sort domain but has prefixed it with 'Lookup_" and put double_underscores where there were single underscores.
Whenever I set OrderByOn=True (when the form opens for example), the Enter Parameter Value Box pops up..It's almost as though Access does not understand the sort domain that it built itself.
If I enter a valid value in the Parameter box, Access seems perfectly happy... it navigates to other records for example.
I've researched this as much as I can but very few people seem to have experienced the issue. Does anyone know how these "[LookUp_" criteria work please??
Any tips gratefully accepted.... thanks