I have a subform which contains resources for cases. Each case will have many resources and each resource has their own kick-off form. What I want to do is have a button on each record of the subform that opens a different form depending on the value in the resource combobox.
(Even as I write this I realize that the visibility of the button might not be the best way to get where I am going!)
The button will open a form which is specific to the chosen resource. It will literally be as simple as if combobox=ResourceONE then open form frmKickoff_ONE, if combobox=Resource2 then open form frmKickoff_TWO, etc...
Since this is a subform on the main form frmCases, the button opens the form filtered on the case and resource.
My thought was to create a bunch of buttons and show/hide based on the combobox, but I think there is probably a better way! Any and all suggestions are welcome. Thanks.
(Even as I write this I realize that the visibility of the button might not be the best way to get where I am going!)
The button will open a form which is specific to the chosen resource. It will literally be as simple as if combobox=ResourceONE then open form frmKickoff_ONE, if combobox=Resource2 then open form frmKickoff_TWO, etc...
Since this is a subform on the main form frmCases, the button opens the form filtered on the case and resource.
Code:
DoCmd.OpenForm "frmKickoff_ONE", , , "CaseName='" & Me.CaseName & "' And ResourceName ='" & Me.ResourceName & "'"
My thought was to create a bunch of buttons and show/hide based on the combobox, but I think there is probably a better way! Any and all suggestions are welcome. Thanks.