In this video I demonstrate the Procedural/Application programming difference.
We’ll cover Access form events:
Creating An Event Procedure
Reacting To User Actions Programatically
Using the DoCmd Object
Frame and Option Button Events
Command Button Events
Drop Down Box Events
Using our form from the last video, add and “image” control to the top called “imglogo”:
Click it, then draw the image on the top of your form. The click “Cancel” when the “Insert Picture” dialog appears. You can either select the image from a specific folder, or code it to appear on the load event. We are doing the latter.
Right click the image and make the Properties dialog box appear. From the “Property Sheet”, click “Other” then “Name”, and call it, “imgLogo”.
We code it for the image to appear when the form loads.
Private Sub Form_Load() Me.imgLogo.Picture = "C:\WINDOWS\ServicePackFiles\i386\mslogo.jpg" End Sub Private Sub fraCustomerLabels_Click() If Me.fraCustomerLabels.Value = 2 Then Me.cboCountry.Requery Me.cboCountry.SetFocus End If End Sub
Sign up for 10 FREE VBA videos that will help you do your job better at: