4th Meeting FINALSFundamental of Database Systems
4th Meeting FINALSFundamental of Database Systems
If you want to fully customize your database, or if you need to create a custom function not
possible through an expression or predefined macros, you might need to use programming codes.
Programming in Access is done using the Microsoft Visual Basic for Applications (VBA) code.
MsgBox Function
You can use Visual Basic procedures to customize your message box that is not possible
through macros. MsgBox function displays a message in a dialog box, waits for the user to click a
button, and returns an Integer indicating which button the user clicked.
Part Description
Types of button
Default
Constant Default value Meaning
vbDefaultButton1 0 First button is the default.
vbDefaultButton2 256 Second button is the default.
vbDefaultButton3 512 Third button is the default.
vbDefaultButton4 768 Fourth button is the default
Sample Program:
MsgBox “This is just a demo. Do you want to continue?”, 67, “Sample” where the result of
adding the values for button types, icon styles and default: 64 + 3 + 0
Title
Displays
Information icon Prompt
(64)
Displays Yes, No
and Cancel buttons
(3)