Showing posts with label Languages. Show all posts
Showing posts with label Languages. Show all posts

Sunday, February 3, 2013

Access Visual Basic and Excel VBA Macros - A Comparison of the MS Office Programming Languages

Similarities between Excel VBA and Access VBA

In theory it should be easy to switch from one MS Office VBA programming language to another, since all the underlying principles are the same. It doesn't matter whether you're writing VBA macros within Access, Excel, Outlook, PowerPoint or Word, you're still using:

- objects, collections, methods and properties

Access Visual Basic and Excel VBA Macros - A Comparison of the MS Office Programming Languages

- variables (the DIM statement)

- IF conditions and loops

- message boxes and input boxes

- subroutines and functions

In fact, the only thing which is different is the object and collections defined within the application. So how hard can it be to switch from (say) Excel VBA to Access VBA? The answer, sadly, is... fairly hard. Here's why!

Differences between Excel Visual Basic and Access Visual Basic

The main differences between the two programming languages are that Access supports two macro languages, doesn't support recording, has two different ways to create Visual Basic macros, hides a lot of its functionality in the DoCmd object and has two separate object models. If that didn't make much sense, worry not - the rest of this article will explain each of these points in turn.

Access has Two Macro Languages

This is a red herring. Microsoft Access has two separate languages for writing macros: one called macros, the other called either modules or Visual Basic. If you have any knowledge of VBA, you should ignore the first; it is provided for people who have no programming experience, and doesn't support proper looping, error-handling and many other structures. So although the Access database window contains a MACROS tab, you should ignore this completely!

Access doesn't Support Recording

Want to know how to colour a cell red with pink spots in Excel? If you can't guess the macro command (unlikely), you can just record a macro and have a look at the resulting code. This is a vital aide-memoire even when you're a VBA guru.

Access, on the other hand, doesn't support recording - not even in the latest version at the time of writing, Access 2010. This is, to say the least, a shame (interestingly, while Word supports VBA recording, PowerPoint doesn't any more: Microsoft removed the facility from version 2007 onwards). This means that you're often forced to resort to Google, Microsoft help or phoning a friend to find out how to do something in Access VBA.

Two Different Ways to Write Macros in Access

Want to create a VBA macro in Access? To do this, you need to go to the VBA code editor. Strangely, you can do this in two different ways: either press ALT + F11 as normal, or click on the Modules tab in the database window and choose to create a new module. Why are there two different ways to do the same thing? Historical reasons, we think.

Access Uses the DoCmd Object for Many Commands

Access VBA is complicated (or simplified?) by the fact that about half the commands begin with DoCmd. For example:

DoCmd.OpenForm - to open a form

DoCmd.Maximize - to maximise a window

Features like this make Excel a far more logical programming language than Access.

Access has Two Separate Object Models

Excel is pretty self-contained (although if you're creating your own dialog boxes, you'll be using a separate applications called Microsoft Forms). Access, however, splits into two almost equal parts:

- tables and queries are part of the Access database engine

- forms, reports, macros and modules are part of the Microsoft Access application

Although you'll probably only hit this complication when you get into advanced programming in Access, it's another Access feature to muddy the VBA water.

In summary, then, we'd say that Excel macros are far more straightforward than Access ones. Added to this is the fact that it's much quicker to learn Excel than it is to learn Access, and you get two unequal learning curves!

Access Visual Basic and Excel VBA Macros - A Comparison of the MS Office Programming Languages
Check For The New Release in Health, Fitness & Dieting Category of Books NOW!
Check What Are The Top Cooking Books in Last 90 Days Best Cheap Deal!
Check For Cookbooks Best Sellers 2012 Discount OFFER!
Check for Top 100 Most Popular Books People Are Buying Daily Price Update!
Check For 100 New Release & BestSeller Books For Your Collection

Andy Brown is a trainer and developer for Wise Owl Training, a company providing Microsoft computer training in the UK.

For Wise Owl courses specific to Excel Visual Basic, go to http://www.wiseowl.co.uk/excel/courses/vba.htm; for courses specific to Access Visual Basic, go to http://www.wiseowl.co.uk/ms-access/training/visual-basic.htm.

mobile phone watches Best Price Dual Motor Deluxe Power Unit For Buy Acdelco D1483D Ignition Lock Cylinder For 118 Buy 7 8 X 10 4 Rectangular Home

Tuesday, January 22, 2013

The Different Types of Programming Languages - Learn the Basics

The progression of computer programming languages was made possible by the programmer's search for efficient translation of human language into something that can be read and understood by computers. The languages generated, called machine code, have high levels of abstraction, which hide the computer hardware and make use of representations that are more convenient to programmers.

As programs evolve and become more sophisticated, programmers found out that certain types of computer languages are easier to support. As expected in a dynamic discipline, there is no standard for categorizing the languages used in programming. There are, in fact, dozens of categories. One of the most basic ways to categorize the languages is through a programming paradigm, which gives the programmer's view of code execution. Among the languages classifications according to programming paradigm are:

o Object-Oriented Programming Languages
Known as the newest and most powerful paradigms, object-oriented programming requires the designer to specify the data structures as well as the types of operations to be applied on those data structures. The pairing of data, and the operations that can be done on it is called an object. A program made using this language is therefore made up of a set of cooperating objects instead of an instructions list.

The Different Types of Programming Languages - Learn the Basics

The most famous object-oriented programming these days are C#, C , Visual Basic, Java, and Python.

o Structured Programming Languages

An exceptional type of procedural programming, structured programming provides programmers with additional tools to handle the problems created by larger programs. When using this language, programmers are required to cut program structure into small pieces of code that can easily be understood. Instead of using global variables, it employs variables that are local to every subroutine. Among the popular features of structured programming is that it doesn't accept GOTO statement which is usually associated with the top-down approach. Such approach starts with an opening overview of the system with minimal details about the various parts. To add these details, design iterations are then included to complete the design.

Commonly used structured languages include C, Pascal, and ADA.

o Procedural Programming Languages

Procedural Programming involves a list of operations the program needs to complete to be able to attain the preferred state. It is a simple programming paradigm where every program comes with a starting phase, a list of tasks and operations, and an ending stage. Also called imperative programming, this approach comes with small sections of code that perform certain functions. These sections are made up of procedures, subroutines, or methods. A procedure is made up of a list of computations that should be done. Procedural programming lets a part of the code to be used again without the need to make several copies. It achieves this by dividing programmatic tasks into small sections. Because of this, programmers are also capable of maintaining and understanding program structure.

Among the known procedural languages are BASIC and FORTRAN.

These are the different types of computer programming languages that you can consider when planning to make a computer program. Procedural programming splits the program's source code into smaller fragments. Structured languages require more constraints in the flow and organization of programs. And object-oriented programs arrange codes and data structures into objects.

The Different Types of Programming Languages - Learn the Basics
Check For The New Release in Health, Fitness & Dieting Category of Books NOW!
Check What Are The Top Cooking Books in Last 90 Days Best Cheap Deal!
Check For Cookbooks Best Sellers 2012 Discount OFFER!
Check for Top 100 Most Popular Books People Are Buying Daily Price Update!
Check For 100 New Release & BestSeller Books For Your Collection

To learn more about computer programming, including how you can get started creating your own programs in the next few minutes, Check Out, http://beginnerscomputerprogramming.com

cell phone watches Best Price Dual Motor Deluxe Power Unit For Buy Acdelco D1483D Ignition Lock Cylinder For 118 Buy 7 8 X 10 4 Rectangular Home

Monday, November 5, 2012

Database Programming Languages

Programming languages such as C++, BASIC, and Pascal were produced as general function languages, which means that you can use them to write a flight simulator, an accounting program, a voice identification program, or a word processor.

One of the most common uses for computers, however, is storing and recalling information, such as names, addresses, telephone numbers, prison records, credit history, and past job experience. Calculators store such data in a database. Almost every business relies on databases to store info about clients, inventories, and employees, so nearly every company uses a database program.

Unluckily, most people don't want to know the strange and often freaky commands necessary to store, retrieve, or print info from a database. To make databases easier to use, most databases include a programming specific language. If you publish programs using a database's programming language, you can produce custom databases for various companies. Best of all, database programming languages enable you to create customized databases much faster than using a generic purpose language such as C++ or BASIC.

Database Programming Languages

If you use a database programming language, you write instructions only to falsify the database info. If you use a general function language such as C+, you must write commands to store info and then write supplementary instructions to manipulate that info, fundamentally doubling the quantity of work to execute the same task.

Database programming languages can fulfill the next specific functions:

-If you are composing a software that stores vast chunks of information, you can write a programme much faster by using a database programming language than by using a general function language such as C++ or Pascal.

-Database programming is a profitable field. If you know how to create personalized databases, you virtually never need to worry about being jobless or not making enough money.

Database Programming Languages
Check For The New Release in Health, Fitness & Dieting Category of Books NOW!
Check What Are The Top Cooking Books in Last 90 Days Best Cheap Deal!
Check For Cookbooks Best Sellers 2012 Discount OFFER!
Check for Top 100 Most Popular Books People Are Buying Daily Price Update!
Check For 100 New Release & BestSeller Books For Your Collection

Popov Olestenova has been writing articles for several years. She specializes in various topics. Visit his latest website about Hard Tail Yoga [http://hardtailyogapants.com/] and read her latest post on Gutter Cleaning Tools [http://guttercleaningtoolsonline.com/].

watch cell phone Buy Bern Berkeley Winter Snowboarding Helmet Buy Auburn Gear 5420113 High Performance Series Differential