Microsoft Access - E-Commerce - Lecture Slides, Slides of Fundamentals of E-Commerce

E-Commerce is a growing and dynamic field. It is of special concern for the IT students. Following are the fundamental aspects of these Lecture Slides : Microsoft Access, Application, Driven Programming, Specific Action, Access Object, Command Button Events, Form Events, Lostfocus,, Mousemove,, Mousedown,

Typology: Slides

2012/2013

Uploaded on 07/30/2013

ekyan
ekyan 🇮🇳

4.7

(10)

138 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
An Example Microsoft Access
Application
College.mdb Database Objects
Users use all
objects in an
integrated
fashion
Docsity.com
pf3
pf4
pf5
pf8

Partial preview of the text

Download Microsoft Access - E-Commerce - Lecture Slides and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

An Example Microsoft Access

Application

College.mdb

Database Objects

Users use allobjects in anintegratedfashion

VBA in Microsoft Access

Environment

Microsoft Access provides an

event driven programming

environment

An

event is a specific action

that occurs on (or with) a certain

Access object.

Every object in Microsoft Access has a

series of events

defined.

Command Button Events

Click, DblClick, GotFocus, LostFocus, MouseMove, MouseDown,MouseUp

Form Events

Load, LostFocus, MouseDown, MouseUp, OnConnect, OnDiscount etc.

And many others

An Example Event Driven

Program

•Event Chart for a command button object •Click event

has a VBA Procedure attached

to it.

Private Sub Command5_Click()MsgBox "Command Button Works OK"End Sub

Mouse Click Event Happens Go to the event chart of thecommand button Run the procedure attached to it.

Program Output

Main components of VBA

Programming

Writing Procedures

VBA statements are written in form of procedures

A procedure is a series of VBA statements

A procedure may be

attached to any objects event (event procedure) Or

written separately (without linking it to any object)

Syntax

Sub procedure_name( )

statement 1statement 2 : : End Sub

….Main components of VBA

Programming

..

What to write in VBA Procedures?

  • Using Microsoft Access objects
    • Setting attributes/ calling methods

from Microsoft Access

Objects

  • Syntax
  • ObjectName.attribute_name = – ObjectName.method_name [arguments]
    • Example
  • DoCmd

.

OpenForm

frmStudents

  • Forms!frmStudents

.

Caption = “New Caption”

  • Me

.

Caption = “Changed Caption”

….Main components of VBA

Programming

What to write in VBA Procedures?

Using VBA Control Structures

Selection Structure

If condition Then

Statement(s)

[Else

Statement(s)]

End If

Example:

If value = 0 Then

AlertLabel.ForeColor = "Red"AlertLabel.Font.Bold = TrueAlertLabel.Font.Italic = True

End If