Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004

    Unanswered: Filtered ComboBox, based on Parent Form

    Anybody has this kind of situation?

    Company table,
    Company Offices table,
    Company offices accounts table,
    Company expenses table,
    Periods (years) table,

    There is already a list of Company Offices Acounts for each Company office;
    From CompaniesAndPeriods Form (single) I access CompanyOfficess subform (single) and Company expenses subsubform (continous). There I have to be able to choose company office account based on parent form (CompanyOffices subform) just for the companyoffice - If companyoffice has just 4 account numbers linked to 4 banks I would be able to see just those four accounts filtered from a complete account list in the ComboBox. Behaviour of ComboBox with Where .... I put is strange, it does filter data for first view (First CompanyOffice) but when I go thru subform it doesnt refresh itself (It has to filter CompanyOffice Accounts based on Where - every time I change row).

    How to refresh ComboBox in a subform, or in this case subsubform based on a parent form - which Event should I use - and how to refresh it properly?

  2. #2
    Join Date
    Nov 2003
    In the GotFocus event add the following code



  3. #3
    Join Date
    Mar 2004


    cmboName.requery does not seem to be final solution because of the specific situation:

    When I use (just) the mentioned subform and subsubform without the main form it seems to be okay - no problem.

    But with the combination of form, subform and subsubform (three levels) there is still the problem - filter between form and subform does affect combobox where criteria at subsubform - because it uses the same primary key fields as form uses to make filter against subform. Any suggestion how to solve this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts