Hi all;
Is there a way to update a combo box in form 1 from form 2 combo box? I need this for costing purposes. I have created two forms being the first with combo box 1 the main form while the second one comes in as a popup form updating the underlying main.
Everything is working ok as per plan, except that to get the underlying update the main form I have to requery manually , that is where my issue is.
Can VBA help on this?
This means that at the time of closing the popup form then the main form combo box 1 should be updated. Below is the code I use for updating the first form from the second form and that is where I want to also update the combo box 1
Is there a way to update a combo box in form 1 from form 2 combo box? I need this for costing purposes. I have created two forms being the first with combo box 1 the main form while the second one comes in as a popup form updating the underlying main.
Everything is working ok as per plan, except that to get the underlying update the main form I have to requery manually , that is where my issue is.
Can VBA help on this?
This means that at the time of closing the popup form then the main form combo box 1 should be updated. Below is the code I use for updating the first form from the second form and that is where I want to also update the combo box 1
Code:
Private Sub CmdUpdatelanded_Click()
On Error GoTo Err_Handler
DoCmd.SetWarnings False
DoCmd.OpenQuery "QryLandedCostUpdates"
Beep
MsgBox "Please note that the final costing is now successful and the form will now close", vbOKOnly, "Costing Now Done Congratulations!"
DoCmd.Close
Exit_CmdUpdatelanded_Click:
Exit Sub
Err_Handler:
MsgBox Err.Number & Err.Description, vbExclamation, "Error"
Resume Exit_CmdUpdatelanded_Click
End Sub