![Free-eBooks.net](/resources/img/logo-nfe.png)
![All New Design](/resources/img/allnew.png)
There are various options here. The form wizard option will create a quick, simple looking form. However it is better to become familiar with form design yourself and you will gain a better understanding if you select ‘Design View’.
We need to bind the form to a data source. Remember the table we created earlier called ‘tblCustomers’ – this is what we will use as our data source.
You will see a blank form has been created and also a list of fields from the table ‘tblCustomer’ is shown.
To do this click on a field and while holding the mouse down on it, drag it to the form. Release the mouse button and you will see your field on the form.
While these fields are highlighted hold your mouse down on any field and drag it over to the form. Release the mouse button and you will see all the fields on the form.
Run this form to check out how it looks. To do this go to the ‘View’ menu and select ‘Form View’
You will notice the web address turns blue to show it is a hyperlink. The data type we selected automatically handles this. This form is not the greatest design in the world and we can work on it to make it look better. If you notice the field names have their labels as one word. For example ‘FirstName’. This is due to how we entered it in the original table data source. We can change the display of the label on the form and it won’t in any way affect the table.
Lets now go back and make some alterations to the form. From the menu at the top select the ‘View’ option and then select the option ‘Design View’.
Right click on the label ‘FirstName’ and select the properties option.
We can sort out that problem of having the first name label as one word by adding a space between the words. At the caption property click on FirstName and add a space so it looks like the following:
If you now click back on the form you will notice that the label now says ‘First Name’ as opposed to what we had before ‘FirstName’.
This is much clearer and can be repeated for other form fields.
To change the background colour of the form right click anywhere on it and select properties. Click the small button next to the back color property
However, the label names are now hard to see so we should change them to a lighter color.
Move the mouse just above ‘Customer ID’ and click and hold. Now drag your mouse cursor so that you form a rectangle around the labels.
Release the mouse button and the fields will have small selector icons around them
Now just move your mouse over the labels (do not press any mouse buttons at this stage). You will see your mouse pointer turns into a hand when you hover over the labels. At this point you should right click and bring up the properties window.
Click the button next to the fore color property so that it brings up the color selector box again.
Click ok and all the text in the labels you selected will have now turned white. We have now changed the background color of the form as well as the color of label text. You can of course change the color of individual labels by clicking on each one and selecting properties and then fore color.