G
Guest
I posted this previously and Dirk Glodgar and Albert Kallal provided some
solutions however I'm finding that the solution needs more.
Here is my original post:
I'd like to open a form and filter based on another form's combo box.
The form and cbox is:
frmFinishedGoods.cbProfileID
The form I'd like to open based on the above form's cbox is:
frmQueryFGProcessingFacIDsLineIDs.cbNavigateProfiles
cbProfileID and cbNavigateProfiles source the same table and field. I'd like
cbNavigateProfiles to filter to the record in cbProfileID.
How can I code the On Open property of my form to achieve this?
The solution to this was to code the Event Procedure of a button to this:
Private Sub cmdGOrpt_Click()
On Error GoTo Err_cmdGOrpt_Click
Dim stDocName As String
DoCmd.OpenForm "frmQueryFGProcessingFacIDsLineIDs"
Forms!frmQueryFGProcessingFacIDsLineIDs!cbNavigateProfiles = _
Forms!frmFinishedGoods!cbProfileID
DoCmd.OpenForm Me!cbSelectReportRQ, acNormal
Exit_cmdGOrpt_Click:
Exit Sub
Err_cmdGOrpt_Click:
MsgBox Err.Description
Resume Exit_cmdGOrpt_Click
End Sub
This works fine however the button is now going to be used to open up any
forms that are selected in cbSelectReportRQ.
So now I'm back to square one which is:
cbProfileID and cbNavigateProfiles source the same table and field. I'd like
cbNavigateProfiles to filter to the record in cbProfileID.
How can I code the On Open property of frmQueryFGProcessingFacIDsLineIDs to
achieve this?
solutions however I'm finding that the solution needs more.
Here is my original post:
I'd like to open a form and filter based on another form's combo box.
The form and cbox is:
frmFinishedGoods.cbProfileID
The form I'd like to open based on the above form's cbox is:
frmQueryFGProcessingFacIDsLineIDs.cbNavigateProfiles
cbProfileID and cbNavigateProfiles source the same table and field. I'd like
cbNavigateProfiles to filter to the record in cbProfileID.
How can I code the On Open property of my form to achieve this?
The solution to this was to code the Event Procedure of a button to this:
Private Sub cmdGOrpt_Click()
On Error GoTo Err_cmdGOrpt_Click
Dim stDocName As String
DoCmd.OpenForm "frmQueryFGProcessingFacIDsLineIDs"
Forms!frmQueryFGProcessingFacIDsLineIDs!cbNavigateProfiles = _
Forms!frmFinishedGoods!cbProfileID
DoCmd.OpenForm Me!cbSelectReportRQ, acNormal
Exit_cmdGOrpt_Click:
Exit Sub
Err_cmdGOrpt_Click:
MsgBox Err.Description
Resume Exit_cmdGOrpt_Click
End Sub
This works fine however the button is now going to be used to open up any
forms that are selected in cbSelectReportRQ.
So now I'm back to square one which is:
cbProfileID and cbNavigateProfiles source the same table and field. I'd like
cbNavigateProfiles to filter to the record in cbProfileID.
How can I code the On Open property of frmQueryFGProcessingFacIDsLineIDs to
achieve this?