Open form3 using form1 connected via form2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • User1235
    New Member
    • Dec 2009
    • 2

    Open form3 using form1 connected via form2

    I am new to access, so I will greatly appreciate any help....
    I have three forms and three tables
    Forms Names are:-
    1) frmCommand
    2) frmProductRevis ion
    3) frmProduct

    Field name for each Tables are:-
    1) tblCommand
    Field Name: C_UniqueID ----- C_Name ----- PR_UniqueID

    2) tblProductRevis ion
    Field Name: PR_UniqueID ----- P_UniqueID ----- PR_RevisionName

    3) tblProduct:
    Field Name: P_UniqueID ----- P_Name

    There are two buttons in frmCommand:-
    1) Open Product Revision
    2) Open Product

    There is one button in frmProductRevis ion:-
    1) Open Product

    In order to open frmProduct from frmCommand using a button, following two path can be used ?
    a) frmCommand -> frmProductRevis ion -> frmProduct
    --> Here, frmCommand has Button "Open Product Revision" which opens frmProductRevis ion filtered to that command, and frmProductRevis ion has button "Open Product" which open frmProduct filtered to that Revision.....

    b) frmCommand -> frmProduct
    --> HERS IS THE PROBLEM..... I want to open frmProduct by clicking on button "Open Product" on frmCommand directly, which will first filter Revision for that command and then filter Product for that Revision....
    Instead of using path a) which opens frmProductRevis ion inorder to open frmProduct, I want to do all the filtering in frmCommand without opening frmProductRevis ion.... so that "Open Product" button on frmCommand can directly open frmProduct filtered for that particular command.....

    Is there is way to open "frmProduct " from "frmCommand " by clicking Open Product button on "frmCommand " directly ???

    Thank you
    Attached Files
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    Good summary of your tables and forms to start out with. Could you post the code involved in opening and filtering the other forms for those of us who can not download? The [code ] [/code ] tags will make it easy to read.

    Comment

    • User1235
      New Member
      • Dec 2009
      • 2

      #3
      Here is the Code to open frmProductRevis ion from frmCommand

      Code:
          stDocName = "frmProductRevision"
          
          stLinkCriteria = "[PR_UniqueID]=" & "'" & Me![PR_UniqueID] & "'"
          DoCmd.OpenForm stDocName, , , stLinkCriteria

      Here is the Code to open frmProduct from frmProductRevis ion

      Code:
          stDocName = "frmProduct"
          
          stLinkCriteria = "[P_UniqueID]=" & "'" & Me![P_UniqueID] & "'"
          DoCmd.OpenForm stDocName, , , stLinkCriteria


      My Question is how can Open frmProduct directly from frmCommand ???

      Comment

      • ChipR
        Recognized Expert Top Contributor
        • Jul 2008
        • 1289

        #4
        What do you expect to see when you open frmProduct from frmCommand? It seems that when you open frmProduct from frmProductRevis ion, you filter it to one specific product. If you were to do this from frmCommand, you would have to filter on something else, and I can't tell what you want to filter on.

        Comment

        Working...