Results 1 to 3 of 3
  1. #1
    Gray is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    England
    Posts
    16

    Form Filter/OrderBy Issue

    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

  2. #2
    Gray is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    England
    Posts
    16
    Ah.. I have fixed it.... it was entirely my own fault... the
    Parent_Category_Combobox referenced by LookUp_My_Parent__Category__Combobox].[Category] was not being populated properly... hence the parameter prompt...

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Thanks for posting the answer to the problem. It may just help someone else.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. OrderBy Losing Criteria
    By P5C768 in forum Forms
    Replies: 1
    Last Post: 01-21-2011, 01:07 PM
  2. Yet another filter issue :(
    By ducecoop in forum Access
    Replies: 3
    Last Post: 10-29-2010, 10:00 AM
  3. Criteria or Filter Issue
    By MichaelW in forum Queries
    Replies: 1
    Last Post: 07-06-2010, 01:43 PM
  4. Filter By Form Report (combobox issue)
    By mike.burns7 in forum Reports
    Replies: 1
    Last Post: 06-10-2010, 07:42 PM
  5. command button to filter a subform issue -
    By countdrako in forum Forms
    Replies: 1
    Last Post: 12-09-2005, 11:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums