Title: Form and Graphical User Interfaces
1Form and Graphical User Interfaces
2Lesson plan
- More about queries
- More about entering data into a table
- Form
3More about queries
- Action query to insert a new record into a table
- Queries -gt choose the table -gt right mouse click
-gt SQL View - INSERT INTO User
- VALUES ('000001', '1234567', '34 Lancaster Road',
'Glastonbury', '06033', 'asd_at_yahoo.com')
4Entering data into table
5Entering data into table
6Entering data
7Entering data into table
8Entering data
9Form
- Data entry forms are the primary means of
entering data into tables in the database. - Graphical User Interfaces
10Form
- Spread-sheet like view
- Graphical user interface view
11Why Form?
- Graphical user interface view offers
- Presenting data in an organized and attractive
manner - Offering the ability to limit the number of
fields that appear on the form and allow or
preventing editing a specific value
12Basic Transaction Processing Form
- Serves transaction processing applications which
add new records, or editing existing records
13Basic Transaction Processing Form
- Example create a form to add a new record or
view existing record to Employee table
14Basic Transaction Processing Form
15Basic Transaction Processing Form
16Basic Transaction Processing Form
17Basic Transaction Processing Form
18Basic Transaction Processing Form
19Using Design Form Window
- Form -gt Create form in Design view
20Using Design Form Window
21Using Design Form Window
22Using Design Form Window
23Using Design Form Window
Private Sub AddNewRecord_Click() On Error GoTo
Err_AddNewRecord_Click Dim sqlStatement As
String strStatement "insert into
Employee values('" Me.userssn "','"
Me.username "'," Me.usersalary ")"
DoCmd.RunSQL (strStatement)
Exit_AddNewRecord_Click Exit Sub
24Create forms with more than one table
25Create forms with more than one table
26Create forms with more than one table
27Create forms with more than one table
28Create forms with more than one table
29Create forms with more than one table
30Create forms with more than one table
31Adding Option Groups
32Adding Option Groups
33Adding Option Groups
34Adding Option Groups
35Adding Option Groups
36Adding Option Groups
37Adding Option Groups
38Adding List boxes
39Adding List boxes
40Adding List boxes
41Adding List boxes
42Adding List boxes
43Adding List boxes
44Adding List boxes
45Practice
- Create a form to add a new record and view
existing records to Course table
46Week 5 - Practice
- Change the Registration table so that every time,
we add a new record, the list of available
students (studentID, firstName, lastName) and
courses (courseID, courseTitle)
47Practice
Create forms in section a and b of project 1,
part 4