Notes on working with forms:

Moving around within the forms:

Tab moves from field to field on the form in the order that the fields were placed on the form. If you tab through the main student form that I originally created you will notice that you first go to Enrolled and then to Major Name. Shift + Tab moves backwards within the fields (confined to the main form or the subform).

Ctrl + Tab and Ctrl + Shift +Tab can be used to go between forms forwards and backwards when the simple Tab and Shift + Tab do not.

There are many more combinations that allow movement - check help for more information.

Changing the order that you move through with Tab. The Tab Index is the field that you need to modify to change the order. Note that on the example below the Tab Index is a 0. On the name, the Tab Index is a 1, on the enrollment field Tab Index is a 2 and on the major name field the Tab Index is a 3. This mean when I tab through, I will go to the enrollment field prior to going to the major name field. Changing the Tab Index will alter this.

Creating a new form to use to add and change data on the tables:

I am making a new form for the course table. To do this I am creating a new form in design mode and I have selected course00 as the table that I want to use.

The form header is created using a label. I changed the name to hdrForm, made it etched and increased the font size to 14 for look. Other properties could also be set to make a variety of changes to the look of the header. Note that the list of fields has all of the fields available for this form.

Now I want to bring data in - I want the label on text boxes to be above as they were in the other forms I designed using this database. I can see the location and set up when I click on the text box in the toolbox and then look at the properties. The location by Label X and Label Y is the information in your text that indicates that I want this placement. This makes sense - I am setting defaults for the use of the text box.

However before I start bring in the data, I am going to bring in a text box in the header area to hold the date. To do this I bring over the text box and then I changed the caption in the header part to read Date. Next I want to use the Expression Builder to set up the date. To do this, first I selected functions and then date and had Date() entered in as the system date. To get the look I wanted on the form I made the properties of the box transparent and flat.

Next I used the field list and brought over the three fields that are associated with the course00 table. I changed the label and the size to match the data.

There are a lot of other things to consider in setting up the form - you should look at the property options and understand the power that they provide to the developer. For example, the default for navigating from one record to another is the form property Navigation Button set to YES. If you do not want the navigation button at the bottom of the form, you can change that to NO. Now I can add other buttons to my form to control movement. To add other buttons, I want to use the Wizard at this point so that the Visual Basic script that is used will get written automatically. To do this I click on the Wizard option in the tool box and then I click on the buttons. I bring over the button and the wizard is activated. Using the wizard, I am now able to establish buttons to navigate.

For the first button I selected Goto First Record. The next screen will allow me to vary the look of the button. I decided to go with the default, but I could have chosen text or another picture. The next screen then lets me label the button, I called it GoFirst. The button is now shown on my form. Using the category Record Navigation, I added buttons to go to the first, previous, next and last. Then using category Record Operations I added a button to Add New Record and Delete Record. When prompted for a name, I gave each one a name.

Note: for the navigation buttons, I used pictures and for the record operation buttons I used text.

I then went in and added some records. Note that when the record is added it goes in at the end of the records. However when you leave the form and come back, the file is in order by CourseCode because that is the primary key. Note that changes to the data happen when you make changes to the data in the form. Move on to the next record, when you go back, you will see the change. You can also see the change when you look at the data in the table.

I decided that I now wanted to make a form where people could view the data but they could not modify it. To do this I clicked on the name of the form and went to Edit/Copy. Then I did a paste and Access came back and asked me for a name for the form. I called it Course View Form. Next I went in and changed the ability to Add, Delete or Edit data to No (the default is Yes). This means that the data can be viewed but it cannot be changed. Since I don't need the Add and Delete buttons, I removed them.