VB Programing support Access Database Microsoft Office VB.Net & SQL Server nev@NevVB.com.au Sydney, Australia (612) 9453-0456 Contact Details 23/02/2012
Microsoft Access is showing its age. Most of the techniques (File Server, VBA, DAO, Jet Database Engine, etc) hark back 20 or more years. Microsoft will continue supporting VBA for many years to come, but the emphasis is rapidly changing in favour of Visual Basic.Net. The reasons for an upgrade from Microsoft Access to Visual Basic.Net are:
For these reasons, the conversion of existing Access administrative systems to VB.Net and SQL Server may become an imperative.
Most new business applications will be designed by the professional developer using a VB.Net Front-End and a SQL Server Back-End database.
With an awful lot of hand coding and hard work, it is just about possible to convert existing VBA code, Access Forms and Reports to VB.NET. It is however quicker and more cost effective to extract only the existing business rules logic, and start from scratch creating new Forms.
This note details the strategy to minimise some of the hurdles that will be met with the conversion, and reduce the programming effort.
Most of the VBA code logic is used for the support of the User Interface – it has no meaning in the VB.Net environment. There will be little or nothing to be gained from any attempt to convert the Form related code. The VBA to VB.Net conversion effort should concentrate on the identification and conversion of business rules contained in the VBA code modules.
The conversion effort very much depends upon the standards used by the programmers – and usually, depending upon the experience of the programmers and the age of inception of the system, the standards will leave a lot to be desired.
Standards that will ease the conversion should be implemented first in the Access system. There are several modifications that can be done to make the later code conversion easier:
It would be helpful if Control fields could be renamed with descriptive names, instead of Text1, Text2 or Command1, Command2. Unfortunately changing a Field name can cause problems, as the Field may be referred to in other Forms, Macros, Reports, Modules or Queries. After any such changes, the Access system usually becomes a nightmare to debug.
DAO functions like Recordsets and Querydefs will need to be converted to either ADO or ADO.Net. ADO.Net is newer than ADO, but ADO is still supported. If you are familiar with ADO, stick with it – it is simpler than and just as efficient as ADO.Net.
After the Initial Conversion Attempt
Welcome to the joys of Object Oriented Visual Basic!