MIS333k(Poynor) Chapter 2. Intro to VBA Events Where to plug in your programs?

Slides:



Advertisements
Similar presentations
Access Manual 4 By Elham S.Khorasani Ismail Guneydas Dhawala Kovuri.
Advertisements

Copyright © 2008 Pearson Prentice Hall. All rights reserved Committed to Shaping the Next Generation of IT Experts. Exploring Microsoft Office Access.
CS7026 jQuery Events. What are Events?  jQuery is tailor-made to respond to events in an HTML page.  Events are actions that can be detected by your.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
1 Chapter 3 Reviewing Forms, Reports, and Data Access Pages.
Exploring Microsoft Access Chapter 8 Creating More Powerful Applications: Introduction to VBA By Robert T. Grauer Maryann Barber.
Form’s Events ISYS 562. Form Events Opening & closing form:Open, Close, Load, Unload Moving to and from the form: Activate, deactivate Moving from control.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Exploring Office Grauer and Barber 1 Creating More Powerful Applications: Introduction to VBA(Wk9)
Event-Driven Programming and Access Events
Introduction to Computing Dr. Nadeem A Khan. Lecture 13.
Macros Tutorial Week 20. Objectives By the end of this tutorial you should understand how to: Create macros Assign macros to events Associate macros with.
CS0004: Introduction to Programming Events. Review  Event Procedure  A set of instructions to be executed when a certain event happens.  Many event-driven.
Automating Tasks with Macros. Macro Essentials  A macro is a list of actions that happen when you run the macro.  Creating a Macro: − Choose Create.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
WORKING WITH MACROS CHAPTER 10 WORKING WITH MACROS.
Not in Text CP212 Winter No VBA Required “Regular” Programming traditional programming is sequential in nature o one command executed after another.
Copyright 2007, Information Builders. Slide 1 Maintain & JavaScript: Two Great Tools that Work Great Together Mark Derwin and Mark Rawls Information Builders.
XP Chapter 4 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Collecting Data for Well-Designed Forms Chapter 4 “Making.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Lab 9 – User Forms Design. User Forms What are user forms? –Known as dialog boxes –Major ways for getting user input An example of using user forms: Monthly.
VBA – Visual Basic for Applications Week 20 - Tutorial.
Enhancing User Interaction Through Programming
Week 8.  Recap  User Forms  Input Validation Message Boxes Input Boxes  Conversion Functions.
® Microsoft Access 2010 Tutorial 11 Using and Writing Visual Basic for Applications Code.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Five More on the Selection Structure.
Lập trình trên Windows với Microsoft®.NET Giảng viên : Hồ Hoàn Kiếm.
McGraw-Hill/Irwin Programming in Visual Basic 6.0 © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Update Edition Chapter 11 Accessing Database.
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
ACCESS Part 2. OBJECTIVES  Use the Form Wizard  Create a split form  Use Form Layout View  Add fields to a form  Modify form controls  Create calculations.
Lecture Set 13 Drawing Mouse and Keyboard Events Part B – Mouse and Keyboard Events.
Microsoft Access 2013 Simplify Data Entry with Forms Chapter 3.
CO1552 Web Application Development HTML Forms, Events and an introduction to JavaScript.
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
Windows Forms Navigating database with windows forms.
Exploring Microsoft Access Chapter 8 Creating More Powerful Applications: Introduction to VBA.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
XP Chapter 4 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Collecting Data for Well-Designed Forms Chapter 4 “Making.
DB Implementation: MS Access Forms. MS Access Forms  Purpose Data entry, editing, & viewing data in tables Forms are user-friendlier to end-users than.
Forms Using. 2  Plan a form  Create a form  Move and resize controls  Modify labels  Modify text boxes Objectives.
Microsoft Access 2002 Illustrated Complete Forms Using.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
More Form Tools Combo Box (displays a list) Check Box (yes/no) Frame (groups option buttons) Option Button (exclusive choice) Ref Edit (user selects cells)
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.
Microsoft Access 2003 Illustrated Introductory Using Forms.
Microsoft Visual Basic 2012 CHAPTER FIVE Decision Structures.
COMPREHENSIVE Access Tutorial 11 Using and Writing Visual Basic for Applications Code.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
Implement User Input Windows Development Fundamentals LESSON 2.4A.
Course ILT Using complex selection structures Unit objectives Include radio buttons and check boxes in an interface, create and call a user- defined Sub.
Microsoft Access 2016 Simplify Data Entry with Forms
Edit a Public Holiday – Holiday Calendar
Building a User Interface with Forms
Microsoft Access 2003 Illustrated Complete
Microsoft Access Illustrated
Simplify Data Entry with Forms Chapter 3
Objectives Learn about Function procedures (functions), Sub procedures (subroutines), and modules Review and modify an existing subroutine in an event.
Chapter 7 Advanced Form Techniques
Visual Basic Properties, Methods and Events
CSE 154 Lecture 11: More Events.
Custom dialog boxes Unit objectives
Department Array in Visual Basic
Introduction to jQuery
JavaScript and Events CS Programming Languages for Web Applications
MsgBox, InputBox, and other Day 7 stuff.
CHAPTER 6 EVENTS. CHAPTER 6 EVENTS WHAT IS AN EVENT?
Tutorial 11 Using and Writing Visual Basic for Applications Code
Presentation transcript:

MIS333k(Poynor) Chapter 2. Intro to VBA Events Where to plug in your programs?

MIS333k(Poynor) Click Use Properties Sheet of the control to provide your own VBA logic for the Click event How? Find the “On Click” property and click its builder button to create or edit the VBA code. A common event for buttons and other controls.

MIS333k(Poynor) Form Events Open  Load  Resize  Activate  Current Unload  Deactivate  Close These are the common form events.

MIS333k(Poynor) Events you can Cancel Private Sub Form_Open (Cancel As Integer) Private Sub Form_Unload (Cancel As Integer) Private Sub Form_BeforeUpdate (Cancel As Integer) To prevent forms opening or closing, and prevent dirty data

MIS333k(Poynor) Form_Open Verify user should open this form Cancel efficiently (Cancel = True) When to use this event?

MIS333k(Poynor) Form_UnLoad Close button on form is clicked To initiate logic that checks whether to close the form If not closing issue an error message and Cancel the event When to use this event?

MIS333k(Poynor) Form_BeforeUpdate To inspect controls or fields for valid data (and cancel the update in case of invalid data) To initiate error messages To prompt for corrections to fields When to use this event?

MIS333k(Poynor) Form_Current To coordinate all controls on forms with changes to the record position. Remember the navigation Combo ? To control smart navigation buttons Not to check for errors When to use this event?

MIS333k(Poynor) Inside the Form When you move the focus to an existing record on a form, enter or change data in the record, and then move the focus to another record, the following sequence of events occurs for the form: Current  BeforeUpdate  AfterUpdate  Current

MIS333k(Poynor) Inside a Control When you change the text in a text box or in a combo box, the Change event occurs. But it occurs before you move to a different control or record (before the BeforeUpdate and AfterUpdate events occur). The following sequence of events occurs for each key you press in a text box or in the text box portion of a combo box: KeyDown  KeyPress  Change  KeyUp

MIS333k(Poynor) Click The Click event applies only to forms, form sections, and controls on a form This event doesn't apply to check boxes, option buttons, or toggle buttons in an option group. It applies only to the option group itself. MouseDown  MouseUp  Click  DblClick  Click

MIS333k(Poynor) Help? Look for “Event properties reference” In Help: Index In Help: Answer Wizard