Hi all
long time lurker now needing some help! Firstly I have to say thanks for all the help I've received but not asked for but now I find I need to ask a question and hope someone can help.
I have created a database that uses a menu system and pop up forms and all is working nicely, now I am trying to enhance the experience by enabling new records to be created that requires other forms to open that previously required you to return to the menu.
This is working nicely using global variables and conditions so forms know if they were opened from the main menu or from a form. All works appart from one scenario.
I have a form that has a linked subform:
form = risk
subform = exception
for the subform to have data it has to link to the risk, I do this by the risk ID field. This works
Waht I now have is a button on the risk form to enable a user to create a new exception and automatically link the two together. This works nicely but requires the risk form to close and reopen for the data to all link.
What I do is this:
user clicks new exception
a global variable records the current risk ID and passes this to the new open exception form
the exception is created and passes the exception ID back to a combo box on the risk form
this combo box records a value into the table exceptions
What my problem is is this, if I use the combo box directly it updates the record in the table and the subform maps to the new link
when I pass the value to the combo box from the new exception form it updates the combo box when it closes, but the combo box does not record the value until the form is closed or record is changed
so the simple question is this, how do I get the combo box to update/save its new value from the close event of the exceptions form?
I have the combo box requery to update its list so it can see the new exception so that works but how do I get the form to save the updated value when passed from a vba macro?
long time lurker now needing some help! Firstly I have to say thanks for all the help I've received but not asked for but now I find I need to ask a question and hope someone can help.
I have created a database that uses a menu system and pop up forms and all is working nicely, now I am trying to enhance the experience by enabling new records to be created that requires other forms to open that previously required you to return to the menu.
This is working nicely using global variables and conditions so forms know if they were opened from the main menu or from a form. All works appart from one scenario.
I have a form that has a linked subform:
form = risk
subform = exception
for the subform to have data it has to link to the risk, I do this by the risk ID field. This works
Waht I now have is a button on the risk form to enable a user to create a new exception and automatically link the two together. This works nicely but requires the risk form to close and reopen for the data to all link.
What I do is this:
user clicks new exception
a global variable records the current risk ID and passes this to the new open exception form
the exception is created and passes the exception ID back to a combo box on the risk form
this combo box records a value into the table exceptions
What my problem is is this, if I use the combo box directly it updates the record in the table and the subform maps to the new link
when I pass the value to the combo box from the new exception form it updates the combo box when it closes, but the combo box does not record the value until the form is closed or record is changed
so the simple question is this, how do I get the combo box to update/save its new value from the close event of the exceptions form?
I have the combo box requery to update its list so it can see the new exception so that works but how do I get the form to save the updated value when passed from a vba macro?