Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC 240 (Blum)1 Forms and Importing Data in Access.

Similar presentations


Presentation on theme: "CSC 240 (Blum)1 Forms and Importing Data in Access."— Presentation transcript:

1 CSC 240 (Blum)1 Forms and Importing Data in Access

2 CSC 240 (Blum)2 Highlight the Customer Table, click on the Create tab and then on the Form icon.

3 CSC 240 (Blum)3 Customer form generated.

4 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

5 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

6 CSC 240 (Blum)6 Use the subform to place another order for Jane Doe.

7 CSC 240 (Blum)7 Close the form, you should be prompted to save it.

8 CSC 240 (Blum)8 Open up the Order table and note that the new record appears there.

9 Use the drop-down list on the left-hand side to choose Forms CSC 240 (Blum)9

10 10 Use the Customer Form to add another customer.

11 CSC 240 (Blum)11 Close the form and open the Customer table to verify that the new customer was added.

12 CSC 240 (Blum)12 Return to the Customer form and go over to Design View.

13 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.

14 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.

15 CSC 240 (Blum)15 Clicking on it a second time allows one to change the text, make it say First Name.

16 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.

17 CSC 240 (Blum)17 Right click on the label and choose Properties.

18 CSC 240 (Blum)18 See the Property Sheet on the right.

19 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.)

20 CSC 240 (Blum)20 Look at the form in Form View

21 CSC 240 (Blum)21 One may need to return to design view to make adjustments for instance shrinking the state textbox.

22 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.

23 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.

24 CSC 240 (Blum)24 Open the file with Microsoft Excel.

25 Next go to the Telephone Directory CSC 240 (Blum)25

26 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

27 Paste it into Excel – make sure the names line up. CSC 240 (Blum)27

28 Delete the column with the duplicate name information. Save. CSC 240 (Blum)28

29 CSC 240 (Blum)29 Start a new database. Go to the External Data Tab and click on Excel

30 CSC 240 (Blum)30 Select the file and click Open.

31 Choose the Import option. CSC 240 (Blum)31

32 CSC 240 (Blum)32 Check the box indicating that the first row contains the field names as opposed to just containing other data.

33 Chose “Do not import” for the Prefix field CSC 240 (Blum)33

34 Rename the field names – spaces in field names are trouble CSC 240 (Blum)34

35 Decide what to do about primary key CSC 240 (Blum)35

36 CSC 240 (Blum)36 Indicate that the data will go into a new table. Choose to have the Wizard analyze your data

37 Wizard CSC 240 (Blum)37

38 Wizard 2 CSC 240 (Blum)38

39 Wizard 3 CSC 240 (Blum)39

40 Result from Wizard CSC 240 (Blum)40

41 I dragged RepFirstName back to Table2 and then RepState (DC) and RepCity (Wash.) to Table3 CSC 240 (Blum)41

42 Highlight a table and click on the rename table button and rename the tables. CSC 240 (Blum)42

43 More wizard CSC 240 (Blum)43

44 Even more Wizard CSC 240 (Blum)44

45 Allow it to create query that recreates original input CSC 240 (Blum)45

46 CSC 240 (Blum)46 Examine the tables and query in DataSheet view.

47 CSC 240 (Blum)47 Make a parameterized query that lists the members from a state entered by the user.

48 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.

49 CSC 240 (Blum)49 Results of the counting query.

50 CSC 240 (Blum)50 SQL View of the counting query.

51 CSC 240 (Blum)51 We can give the column a different name by editing the SQL statement.

52 CSC 240 (Blum)52 Save and run. Results with renamed column.

53 CSC 240 (Blum)53 Start a new query and go to SQL view. Enter the text seen below.

54 CSC 240 (Blum)54 We now have “firstname lastname” as a single field in the query results.


Download ppt "CSC 240 (Blum)1 Forms and Importing Data in Access."

Similar presentations


Ads by Google