I think this is pretty simple and my lack of knowledge with VBA is holding me back, but I've been trying for a few days and still can't get to work so figured I'd post the question. Let me know if anyone would like any other information. Thanks in advance for taking the time to read / help.
So I have an input form, bound to a table called tblTransaction (form name 'frmAddNewTransaction'). On this input form is a subform called 'subfrmTransactionOwner'. The subform has a combobox on it, called 'cmboSelectOwner'. I also have a button on the main form, called 'cmdAddOwner', that launches a form to add an owner to the system - 'frmAddOwner'.
The main form, subform, combobox and add add Owner form work great, except under this one scenario.
The scenario is if I need to add a new transaction, that has an owner not currently in the system.
The process would be to open 'frmAddNewTransaction' and add the relevant data. Then when the user gets to the subform & combobox, ('subfrmTransactionOwner' & 'cmboSelectOwner'), the owner is not in the list (which it shouldn't be at this point). So the user clicks the button, 'cmdAddOwner', and launches 'frmAddOwner'. The owner is added, 'frmAddOwner' is closed and we're back on 'frmAddNewTransaction' at 'cmboSelectOwner' again. But 'cmboSelectOwner' needs to reload / requery to display the owner I just added.
The problem is, I can't figure out how to get this combobox to requery.
Hope my explanation isn't confusing - let me know if anyone would like more info. Thanks
-smf
So I have an input form, bound to a table called tblTransaction (form name 'frmAddNewTransaction'). On this input form is a subform called 'subfrmTransactionOwner'. The subform has a combobox on it, called 'cmboSelectOwner'. I also have a button on the main form, called 'cmdAddOwner', that launches a form to add an owner to the system - 'frmAddOwner'.
The main form, subform, combobox and add add Owner form work great, except under this one scenario.
The scenario is if I need to add a new transaction, that has an owner not currently in the system.
The process would be to open 'frmAddNewTransaction' and add the relevant data. Then when the user gets to the subform & combobox, ('subfrmTransactionOwner' & 'cmboSelectOwner'), the owner is not in the list (which it shouldn't be at this point). So the user clicks the button, 'cmdAddOwner', and launches 'frmAddOwner'. The owner is added, 'frmAddOwner' is closed and we're back on 'frmAddNewTransaction' at 'cmboSelectOwner' again. But 'cmboSelectOwner' needs to reload / requery to display the owner I just added.
The problem is, I can't figure out how to get this combobox to requery.
Hope my explanation isn't confusing - let me know if anyone would like more info. Thanks
-smf