csc 240 (blum)1 forms and importing data in access
TRANSCRIPT
![Page 1: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/1.jpg)
CSC 240 (Blum) 1
Forms and Importing Data in Access
![Page 2: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/2.jpg)
CSC 240 (Blum) 2
Highlight the Customer Table, click on the Create
tab and then on the Form icon.
![Page 3: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/3.jpg)
CSC 240 (Blum) 3
Customer form generated.
![Page 4: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/4.jpg)
CSC 240 (Blum) 4
A customer’s data is shown in the main part of the form and that customer’s orders are shown in the “subform”
subform
![Page 5: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/5.jpg)
CSC 240 (Blum) 5
• One can use the form’s navigation arrows (not to be confused with the subform’s navigation arrows) to move through the customer records. Back one record Forward one record– | Back to first record | Forward to last record * New record
• One can also use the form to enter data a new customer record or the subform to enter a new order record.
subform
form
![Page 6: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/6.jpg)
CSC 240 (Blum) 6
Use the subform to place another order for Jane Doe.
![Page 7: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/7.jpg)
CSC 240 (Blum) 7
Close the form, you should be prompted to save it.
![Page 8: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/8.jpg)
CSC 240 (Blum) 8
Open up the Order table and note that the new
record appears there.
![Page 9: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/9.jpg)
Use the drop-down list on the left-hand side to choose Forms
CSC 240 (Blum) 9
![Page 10: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/10.jpg)
CSC 240 (Blum) 10
Use the Customer Form to add another customer.
![Page 11: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/11.jpg)
CSC 240 (Blum) 11
Close the form and open the Customer table to
verify that the new customer was added.
![Page 12: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/12.jpg)
CSC 240 (Blum) 12
Return to the Customer form and go over to
Design View.
![Page 13: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/13.jpg)
CSC 240 (Blum) 13
Right click in the open form area, choose Fill/Back Color
from the menu, then select a color from the palette.
![Page 14: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/14.jpg)
CSC 240 (Blum) 14
Place the cursor near the right edge of the form, it should become a double headed arrow. Drag the arrow to increase the size of the form.
![Page 15: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/15.jpg)
CSC 240 (Blum) 15
Clicking on it a second time allows one to change
the text, make it say First Name.
![Page 16: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/16.jpg)
CSC 240 (Blum) 16
Click on something else and then click on the label-textbox combination. You can get double-headed arrows on either side of the label or textbox use them the adjust the sizes. They all moved together.
![Page 17: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/17.jpg)
CSC 240 (Blum) 17
Right click on the label and choose Properties.
![Page 18: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/18.jpg)
CSC 240 (Blum) 18
See the Property Sheet on the right.
![Page 19: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/19.jpg)
CSC 240 (Blum) 19
Rearrange the other labels and textboxes to make a more presentable form. (I could move things after I cut and paste them.)
![Page 20: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/20.jpg)
CSC 240 (Blum) 20
Look at the form in Form View
![Page 21: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/21.jpg)
CSC 240 (Blum) 21
One may need to return to design view to make adjustments for instance shrinking the state textbox.
![Page 22: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/22.jpg)
CSC 240 (Blum) 22
Adjustments to the size of the columns in the subform can be made in Form View. Place the cursor between two columns, when it becomes a double-headed arrow, drag to adjust the column size. Changing the subform is really changing the Order table.
![Page 23: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/23.jpg)
CSC 240 (Blum) 23
Go to the US House of Representatives site and download (right click/Save target as) the Excel Spreadsheet list of members.
![Page 24: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/24.jpg)
CSC 240 (Blum) 24
Open the file with Microsoft Excel.
![Page 25: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/25.jpg)
Next go to the Telephone Directory
CSC 240 (Blum) 25
![Page 26: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/26.jpg)
Highlight and copy the data. Since we will paste into Excel (Microsoft) it is best to use Internet Explorer (also Microsoft)
CSC 240 (Blum) 26
![Page 27: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/27.jpg)
Paste it into Excel – make sure the names line up.
CSC 240 (Blum) 27
![Page 28: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/28.jpg)
Delete the column with the duplicate name information. Save.
CSC 240 (Blum) 28
![Page 29: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/29.jpg)
CSC 240 (Blum) 29
Start a new database. Go to the External Data Tab and click on Excel
![Page 30: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/30.jpg)
CSC 240 (Blum) 30
Select the file and click Open.
![Page 31: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/31.jpg)
Choose the Import option.
CSC 240 (Blum) 31
![Page 32: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/32.jpg)
CSC 240 (Blum) 32
Check the box indicating that the first row contains the field names as opposed to just containing other data.
![Page 33: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/33.jpg)
Chose “Do not import” for the Prefix field
CSC 240 (Blum) 33
![Page 34: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/34.jpg)
Rename the field names – spaces in field names are trouble
CSC 240 (Blum) 34
![Page 35: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/35.jpg)
Decide what to do about primary key
CSC 240 (Blum) 35
![Page 36: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/36.jpg)
Wizard
CSC 240 (Blum) 37
![Page 37: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/37.jpg)
Wizard 2
CSC 240 (Blum) 38
![Page 38: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/38.jpg)
Wizard 3
CSC 240 (Blum) 39
![Page 39: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/39.jpg)
Result from Wizard
CSC 240 (Blum) 40
![Page 40: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/40.jpg)
I dragged RepFirstName back to Table2 and then RepState (DC) and RepCity (Wash.) to Table3
CSC 240 (Blum) 41
![Page 41: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/41.jpg)
Highlight a table and click on the rename table button and rename the tables.
CSC 240 (Blum) 42
![Page 42: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/42.jpg)
More wizard
CSC 240 (Blum) 43
![Page 43: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/43.jpg)
Even more Wizard
CSC 240 (Blum) 44
![Page 44: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/44.jpg)
Allow it to create query that recreates original input
CSC 240 (Blum) 45
![Page 45: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/45.jpg)
CSC 240 (Blum) 46
Examine the tables and query in DataSheet view.
![Page 46: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/46.jpg)
CSC 240 (Blum) 47
Make a parameterized query that lists the
members from a state entered by the user.
![Page 47: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/47.jpg)
CSC 240 (Blum) 48
Create the query below that list the states and the number (count) of representatives. The Total row is obtained by clicking on the button.
![Page 48: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/48.jpg)
CSC 240 (Blum) 49
Results of the counting query.
![Page 49: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/49.jpg)
CSC 240 (Blum) 50
SQL View of the counting query.
![Page 50: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/50.jpg)
CSC 240 (Blum) 51
We can give the column a different name by
editing the SQL statement.
![Page 51: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/51.jpg)
CSC 240 (Blum) 52
Save and run. Results with renamed column.
![Page 52: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/52.jpg)
CSC 240 (Blum) 53
Start a new query and go to SQL view. Enter
the text seen below.
![Page 53: CSC 240 (Blum)1 Forms and Importing Data in Access](https://reader035.vdocuments.site/reader035/viewer/2022070410/56649ef95503460f94c0af1b/html5/thumbnails/53.jpg)
CSC 240 (Blum) 54
We now have “firstname lastname” as a
single field in the query results.