Add VBA code to a control (button, combobox etc.) on from

1. Go to design or layout view of the form
2. Right click the Control and select "Properties" ==> "Event" tab
3. Go to "On click", select "...", on popup box select "Code Builder" (Alternatively, select "[Event Procedure]", then click "...")
4.Change Control name if necessary by going to "Other" tab ==> "Name"