dcsimg
Results 1 to 2 of 2

Thread: [RESOLVED] Filter continuous subform from combo box selection MS Access 2007, Office 2007

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2010
    Posts
    34

    Resolved [RESOLVED] Filter continuous subform from combo box selection MS Access 2007, Office 2007

    I am trying to get (2) pages of a form's tab control to filter subforms based on a combo box entry. I can't get the Filter property to work.

    The combo box is derived from "tblWorkFlowTitles" and stores the value as "dwfTitleNo" on both pages "pgEvaluations" and "pgSignatures" on the tab control of the form "frmMasterTabForm":

    dwfTitleNo 1=Draft Evaluations
    dwfTitleNo 2=Signatures

    On the tab control, page "pgEvaluations" has a continuous subform "subformDraftEvals" and I would like it to only show the records where dwfTitleNo=1 (when "Draft Evaluations" has been selected from the Combobox Name "cboEval")

    Similarly, on the tab control page "pgSignatures" has a continuous subform "subformSignatures" that I would like to only show records where dwfTitle=2 (when "Signatures" has been selected from the combo box Name "cboSig")

    Further, is there any way to have the user's only option in the combo box for the work flow title (either the only option visible or an error message would pop up if the user selects the inappropriate work flow title for the page they are entering data on; whichever is easier) when performing data entry on the continuous subform "subformDraftEvals" and subform "subformSignatures"?

    To sum this all up into some kind of coherent objective:

    I only want "pgEvaluations" on the "frmMasterTabForm" to show the records for the Work Flow Title "Draft Evaluations" aka "1" (associated with a particular docID that the main form already successfully filters when loaded through vba code) and for the user to only be able to enter "Draft Evaluations" as the "dwfTitleNo") when adding a record into the "subformDraftEvals" by data entry. Likewise, on "pgSignatures" I need "subformSignatures" to only show the records for the Work Flow Title "Signatures" aka "2", for the particular docID from the main form (already have the filter code written for the main form) and for the user to only be able to enter the correct work flow title for the subform associated with it by either visibility or an error message if the wrong work flow title is selected.

    I'm attaching the database on 4shared.com below. It is accessible through the form "frmMasterTabForm"and selecting the tabs Evaluations or Signatures.


    http://www.4shared.com/file/p7YqKyff...P_DCS_V26.html (MSAccess2007)
    http://www.4shared.com/document/iu3E..._V26-2003.html (MSAccess 2003)
    Last edited by colecole; May 8th, 2010 at 10:10 PM. Reason: typos making the question unclear

  2. #2

    Thread Starter
    Member
    Join Date
    Apr 2010
    Posts
    34

    Re: Filter continuous subform from combo box selection MS Access 2007, Office 2007

    I had received some advice as follows:

    "From your mainform, you can set a Filter on a Subform like this:

    Me.NameOfYourSubformCONTROL.Form.Filter = " dwfTitleNo=1"
    Me.NameOfYourSubformCONTROL.Form.FilterOn = True

    Note the NameOfYourSubformCONTROL; this may or may not be the same as the form you're using as a SourceObject, so be careful with that.

    This would be done in the AfterUpdate event of your combo
    ."

    However, when I used this code with my "NameOfYourSubformCONTROL" = cboSig and cboEvals for each corresponding subform, it did not recognize the code after Me.cboSig. Then I put in the name of the form: frmMasterTabForm just in case they meant .Form to be the Form Name, but no dice.....

    any ideas???

Tags for this Thread

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width