Okay, you're trying to do all the work yourself, rather than letting Access do it.
Put that kind of code in the subform, in the combo box control's AfterUpdate event. If you want to be able to cancel the "department change" if they don't buy anything, you might do it in BeforeUpdate instead.
Code:
Private Sub cboDepartment_AfterUpdate()
If cboDepartment = "Gift Certificate" Then
DoCmd.OpenForm "Gift Certificates",,,,acDialog,txtKey
' any other stuff
Me.Requery
End If
End Sub
You can open the new form in dialog mode, as above, if you want to force the user to finish that form before proceeding with this one (highly recommended given your current workflow description.)
You can pass information to the popup form via the openargs argument, such as the example above that I assume you need to pass the key of the subform record (which is in a control named txtKey) to your "Gift Certificates". Here's a page that describes how to use OpenArgs. http://www.fmsinc.com/free/NewTips/A...ccesstip13.asp
If you pass the key of the subform rec, then the Gift Certificate form can directly update the underlying table with the price and orderid info, if necessary.
If you have more than one piece of information to pass down to the GC form, then you may be better off using [Tempvars] to pass information in both directions, and let the immediately following code in cboDepartment_AfterUpdate handle the update to the table. (where it says "any other stuff")