i have a subfrom inside a main form which has a combo box called cboDonner,
the cboDonner List Items Edit Form= frmDonner
inside the frmDonner i have a button called btnClose
Code: Select all
Private Sub close_Click()
DoCmd.RunCommand acCmdSaveRecord
Dim cboDonner As Control
' Return Control object pointing to a combo box.
Set cboDonner= Forms!subfrm!cboDonner
' Requery source of data for list box.
cboDonner.Requery
DoCmd.close
End Sub
how to make it work : in summary i want when i click the close button, set focus on the cbo and refresh the data
regards