1. Create a Table: A. Create a table called Publisher having the following structure: Field Name Data Type PubID Short Text PubName Short Text URL Hyperlink Set the field PubID as the primary key. Set the Field Size field property of the field PubID to 5. Set the Field Size field property of the field PubName to 50. Set the caption property of the PubID field to Publisher ID. Set the caption property of the PubName field to Publisher’s Name.
2. Import external data from the Excel spreadsheet file Bookstore. • Make sure to Import the source data into a new table in the current database is selected. • Select the Author worksheet. • Make sure that First Row Contains Column Headings is selected. • For the AuthorID field, set the Data Type option to Long Integer and set the Indexed option to Yes (No Duplicates). • Select Choose my own primary key and make sure the AuthorID field is selected. • Save the table with the name Author
1 TASK
Let's divide this task into smaller segments:
Create a table called Publisher having the following structure:
Field Name - Data Type
PubID - Short Text
PubName - Short Text
URL - Hyperlink
To create a table in Access you need to go to Create -> Table Design.
There you will see tab with new table.
Now, according to the data from the task, you need to enter the field names and select their types (PubID - Short Text, PubName - Short Text, URL - Hyperlink):
Set the field PubID as the primary key.
To set the field as the primary key you need to right click on the needed one (PubID) and choose Primary Key from list:
To make sure everything is done correctly, you should see the following icon next to the field:
To save your table, right click on the name of the tab (Table1), choose Save.
There you can enter your Table Name.
Set the Field Size field property of the field PubID to 5.
Set the Field Size field property of the field PubName to 50.
Set the caption property of the PubID field to Publisher ID.
Set the caption property of the PubName field to Publisher’s Name.
To do these you need to look at the field properties located below the table:
Properties are different for each field. This means, to set parameters to a field, you must left-click on the required field. Let's start from the field PubID. Now you have these values:
Caption is the name of the field for using in forms and reports to display data to the user.
In result you should get next:
2 TASK
Import external data from the Excel spreadsheet file Bookstore.
External Data -> From File->Excel (or if is able External Data->Excel):
Make sure to Import the source data into a new table in the current database is selected.
Choose your file and first radio button:
Select the Author worksheet.
Make sure that First Row Contains Column Headings is selected.
For the AuthorID field, set the Data Type option to Long Integer and set the Indexed option to Yes (No Duplicates).
Select Choose my own primary key and make sure the AuthorID field is selected.
Save the table with the name Author
At the end you will have this table:
To see if data types are right you need to choose design view (right click on table name):
And now you can see that everything okay (AuthorID is primary key and it has long integer value):
Also you can find this description and file here: https://drive.google.com/drive/folders/1R6KFhyVkkPz-UihuCloL-8QsDZNUc_t6?usp=sharing
Comments
Leave a comment