Set Button Properties
In this example, I will explain how to set properties for a “Button” on your form. This does not make use of the Wizard but, uses the “Properties window”.
The first thing you do is select the “Use Control Wizards” in the “Controls” drop down in the “Ribbon”. You must already know how to do that.
Click the “Button” “Control” in the “Ribbon” and click anywhere on the form where you want to put this.
Open the “Properties window” by clicking the respective “Button” in the “Ribbon”.
Under the “Format” tab in the “Properties window”, give the button an appropriate caption.
How about “Previous” ?
Then choose the “Event” (1) tab and click the button with the point icons (2), on the right side of the “OnClick” box. In the dialog that appears, choose “Macro Builder” (3) and click the OK button (4).
This opens the “Macro builder” window. In this window, click the downward pointing arrow and select “Form” in the drop-down menu.
This opens a number of other boxes to fill, each with a downward pointing arrow.
In the second box, the “Object Name”, choose the form in which the action must start.
In this case, this is the “student_layout” form.
So click the down pointing arrow and select the object name as “student_custom”.
In the third box, choose the action to be performed.
Again, click the downward pointing arrow and select “Previous”.
We must navigate to the previous record.
Then close “Macro builder” window by clicking the X icon (1) and answer “Yes” to the question whether you want to save the changes to the macro.
If you want, you can still format the buttons by selecting them in the form and clicking the “Quick Styles” button in the “Ribbon” under the “Format” tab. Choose one of the predesigned buttons in the pop-up menu.
When we view the form in “Form View”, everything looks good.
You've completed Lesson 46 START NEXT LESSON