IF and Macro in Access by linking the use of And / or
What is Access
Microsoft Access has been around for some time, yet people often still ask me what is Microsoft Access and what does it do? Microsoft Access is a part of the Microsoft Office Suite. It does not come with all versions of Microsoft Office, so if you specifically want Microsoft Access make sure the office suite you are purchasing has it.
Access has the look and feel of other Microsoft Office products, including its layout and navigational aspects. That is where the similarity ends. Microsoft® Access is a database and, more specifically, a relational database.
How Microsoft Access is used
Tables: Access stores its data in tables. You can build a single database that includes all the data for the entire project — this is often called a "flat" database.
Relational databases: It's almost always easier, though, to create many tables, each containing elements of the data that needs to be tracked for a project (for example, a business might maintain separate tables for product data, Student, Teacher and Student information). Each of the tables can be interrelated and connected to one another — this is called a relational database, which allows developers to create many relatively simple databases and relate them to each other.
Queries: Queries are another common element in Access databases. The program supports sophisticated queries to find information in the database, which can be important when the database may contain thousands of entries.
Forms: Database developers often create forms that allow users to enter information into the database without using a spreadsheet. By avoiding the need to enter data in a spreadsheet-like table, there's much less chance for data entry error.
Reports: Access allows users to create custom reports quickly and easily. A Report Wizard makes it easy to sort, group, and label data for easy printing and sharing.
Macros in Access. A Macro is a tool that allows you to automate tasks and add functionality to your forms, reports, and controls
    Macros in Access work a bit different from Macros in Word or Excel, where you essentially record a series of keystrokes and play them back later.
    Macros in Access work a bit different from Macros in Word or Excel, where you essentially record a series of keystrokes and play them back later.
    Macros can be standalone objects viewable from the Navigation pane, or embedded directly into a Form or Report. Once you have created database objects like tables, forms and reports, Macros can provide a quick and easy way to tie all those objects together to create a simple database application that anyone can use or even modify, with relatively little training.
    Macros provide a way to run commands without the need to write or even know VBA code, and there is a lot that you could achieve just with Macros.
What is the AND Function?
The AND function is categorized under Access Logical functions. It is used to determine if the given conditions in a test are TRUE.
Formula
=AND(logical1, [logical2], …)
The AND function uses the following arguments:
Logical1 (required argument) – This is the first condition or logical value to be evaluated.
Logical2 (optional requirement) – This is the second condition or logical value to be evaluated.
What is The OR Function?
The OR function is a logical function to test multiple conditions at the same time. OR returns either TRUE or FALSE
Syntax
=OR (logical1, [logical2], ...)
logical1 - The first condition or logical value to evaluate.
logical2 - [optional] The second condition or logical value to evaluate.
Example
IF([Work-Year]>=3 and [Word-Year]<=5 or [Postition]="IT Manager") then
    SetFiled
      Name: Bonus
      Value= 40
IF([Work-Year]>=3 and [Word-Year]<=5 or [Postition]="IT Staff") Then
    SetFiled
      Name: Bonus
      Value= 25
IF([Work-Year]>=3 and [Word-Year]<=5 or [Postition]="Cleaner") Then
    SetFiled
      Name: Bonus
      Value= 15
Else
    SetFiled
    Name: Bonus
      Value= 0
End if
Please Watching My Video is Below
No comments:
Post a Comment