Good morning, I am still working on my Inventory project. So far I have figured out the answer to my earlier questions thanks to the help here.

New problem. Unbound form with 2 command buttons. Each button opens the same form. One opens form with one query and the other opens the form with another.

I want button one to open the form with a combo box on the subform limited by query 1 and the other button to open the form with a combo box limited by query 2. Queries have been tested and work.

I am using the following code which does not work. It is from an example from MS. But it is for a form's data. I do not know how to modify it for a subform combo box, or if it can even be done. Our needs a different approach. Googling often requires more knowledge than I have to phrase it correctly.

Button One:

Code:
Private Sub cmdAllInventory_Click()
On Error GoTo cmdAllInventory_Click_Err

    DoCmd.OpenForm "frmInventory", acNormal, "qryInvAllList", , acFormAdd
    DoCmd.Close acForm, "frmChooseInvDate", acSaveNo
    
cmdAllInventory_Click_Exit:
    Exit Sub

cmdAllInventory_Click_Err:
    MsgBox Error$
    Resume cmdAllInventory_Click_Exit

End Sub
Button Two:

Code:
Private Sub cmdNewInventory_Click()
On Error GoTo cmdNewInventory_Click_Err

    DoCmd.OpenForm "frmInventory", acNormal, "qryInv800List", , acFormAdd
    DoCmd.Close acForm, "frmChooseInvDate", acSaveNo
    
cmdNewInventory_Click_Exit:
    Exit Sub

cmdNewInventory_Click_Err:
    MsgBox Error$
    Resume cmdNewInventory_Click_Exit

End Sub
Thanks for any help in advance.

Best, Scott