Escolar Documentos
Profissional Documentos
Cultura Documentos
A system for lending videos by relating lists of videos and members. Using tables, setting validation, avoiding data duplication, relationships, forms and sub forms.
2. Now create a new table in design view with the field names and data types as shown in the diagram. 3. Set MemberID to be a primary key 4. Save the table as tblMembers
5. Make another table as shown 6. Set VideoID to be a primary key. 7. Save the table as tblVideos.
Page 2 of 12
8. Now create a final table which store all the information about which members have which videos. It will have the following fields. 9. Set LoanID to be the primary key 10. Save this table as tblLoans
Page 3 of 12
1. Choose Lookup Wizard from the drop down list in the Data Type field 2. Choose the option I will type the values that I want
3. Follow the wizard and create a lookup for Mr, Mrs, Miss and Ms
Page 5 of 12
Page 6 of 12
Input masks vary greatly in their format and can be used to set the format of data. In our example we will use input masks to ensure that first names and titles are always text and always capitalised followed by lower case.
Using input masks reduces the likelihood of entry of erroneous data Extension task: You can easily look up other input masks in Access help and apply them to other fields as appropriate
Default values Where data is often repeated then a default value can be set. Default values are very useful when you always want to record the exact time that a record was created. Set the default value for the Date field in tblLoans to Now(). This will now automatically record the data and time of each loan transaction.
Before you proceed further enter some dummy data into the videos and members tables this will make your work
Page 7 of 12
Page 8 of 12
1. Open the loans table in design view and select the lookup wizard from for the videoID field
2. Choose the option I want the lookup column to look up values in a table or query. 3. Click Next and select the videos table
Page 9 of 12
7. Repeat this process for memberID in the loans table selecting LName, FName and DoB in that order when completing the lookup from the members table.
Page 10 of 12
Page 11 of 12
Page 12 of 12
2. Tick all three check boxes and press OK 3. Repeat this process with the link between the loans and videos tables and ticking the check boxes. 4. If the relationships match the diagram below then close and save.
Page 13 of 12
1. Create a columnar layout form based on tblMembers using the form wizard. Include all the fields. You should have a form similar to the one shown. 2. Save the form as subfrmMembers. 3. Repeat this process to make a sub form of the videos table. 4. Save the form as subfrmVideos. Because the sub forms will be used just to view data - you should remove all the navigation from the forms and lock the data entry fields 1. Open the form in design view
2. Right click the black square in the top left hand corner 3. In the format tab; set Scroll Bars to Neither, Record Selectors,
Navigation Buttons and Dividing Lines to No
Page 14 of 12
Page 15 of 12
Page 16 of 12
4. You will need to use the toolbox. If it is not there press the toolbox button on the toolbar. 1. Press the subform button and draw an outline on the screen (the exact size is not important as it will resize to the size of the form). 2. In the wizard, make sure that you select existing forms selected and select subfrmMembers then press next
Page 17 of 12
Page 18 of 12
1. 1. Otherwise select the define my own and, using the pull down lists, select the MemberID from both the form column and the subform column shown.
2. Now select next and finish. 3. Repeat this subform procedure to insert a subform for the video details except this time create the link using the videoID field. Page 19 of 12
5. Use the drop down buttons to select an existing video and existing member. Notice how the full details for each item you have chosen pop up in the sub forms
6. to create a new record click to the new button at the bottom of the form
Page 20 of 12