form and graphical user interfaces. lesson plan more about queries more about entering data into a...

Post on 30-Dec-2015

217 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Form and Graphical User Interfaces

Form and Graphical User Interfaces

Lesson plan

• More about queries • More about entering data into a

table• Form

More about queries• Action query to insert a new record into

a table• Queries -> choose the table -> right

mouse click -> SQL View

INSERT INTO [User]VALUES ('000001', '1234567', '34

Lancaster Road', 'Glastonbury', '06033', 'asd@yahoo.com');

Entering data into table

Entering data into table

Entering data

Entering data into table

Entering data

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)

Form

• Data entry forms are the primary means of entering data into tables in the database.

• Graphical User Interfaces

Form• Spread-sheet like view:

• Graphical user interface view

Why 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

Basic Transaction Processing Form

• Serves transaction processing applications which add new records, or editing existing records

Basic Transaction Processing Form

• Example: create a form to add a new record or view existing record to Employee table

Basic Transaction Processing Form

Basic Transaction Processing Form

Basic Transaction Processing Form

Basic Transaction Processing Form

Basic Transaction Processing Form

Practice

• Create a form to add a new record and view existing records to Course table

Using Design Form Window

• Form -> Create form in Design view

Using Design Form Window

Using Design Form Window

Using Design Form Window

Using Design Form WindowPrivate Sub AddNewRecord_Click()On Error GoTo Err_AddNewRecord_Click

Dim sqlStatement As String

sqlStatement = "insert into [Employee] values('" + Me.userssn + "','" + Me.username + "'," + Me.usersalary + ");"

DoCmd.RunSQL (sqlStatement) Exit_AddNewRecord_Click: Exit Sub

Practice

Create a form to add a new record to the Course table by Create form by Design View

Create forms with more than one table

Quiz 2

1.a:SELECT DirectorFirstName,

DirectorLastNameFROM AchievementWHERE Movie =‘Chicago’;

Quiz 2

1bSELECT MovieFROM AchievementWHERE DirectorFirstName=‘Conrad’ andDirectorLastName=‘Hall’;

Quiz 2

2aMovieChicagoGangs of New York

Quiz 2

2b:Syntax error. Missing From statement. It should be

Select DirectorFirstName, DirectorLastName, Studio

From AchievementWhere movieID =‘200303’;

Quiz 2

3Row 1 and Row 3 will be deleted

Create forms with more than one table

Create forms with more than one table

Create forms with more than one table

Create forms with more than one table

Create forms with more than one table

Create forms with more than one table

Adding Option Groups

Adding Option Groups

Adding Option Groups

Adding Option Groups

Adding Option Groups

Adding Option Groups

Adding Option Groups

Adding List boxes

Adding List boxes

Adding List boxes

Adding List boxes

Adding List boxes

Adding List boxes

Adding List boxes

Practice

Create forms in section a and b of project 1, part 4

top related