Convert Access Vba App to Vb.net

Hi,

I would like to move an application written in  vba Access 2007 to vb.net. Anyone know a tool to do this conversion?
best regards
rflorencioAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AndyAinscowFreelance programmer / ConsultantCommented:
No.
Two very different languages (syntax, program structure...) and loads of objects in Access that don't exist in .net.
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I found this with a search:

http://www.updownload.com/microsoft-access-to-visual-basic-net-object-converter_MALWARE/

but a malware scan shows it to be infected (I added the _MALWARE so others won't inadvertently download).

There's also this:

http://www.redbrooktech.com/AccessConverter.html

It seems more legit, but I haven't tried it, so can't comment. There's a trial version that will convert 10 objects, so you could see how well it does with that.

There's also this:

http://www.microtools.us/anetvb8.aspx

That said - unless your application is very, very basic, you'll normally end up with a lot of cleanup, and the end result will be a kludy, hard-to-manage application that is rife with issues. There are so many differences between Access and .NET that it's hard to imagine a tool that could convert even a moderately complex application.
0
Éric MoreauSenior .Net ConsultantCommented:
There is no more VB6-to-.Net converter in the box so I wouldn't expect much from an Access-to-.Net converter!
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Jeffrey CoachmanMIS LiasonCommented:
Yes,...you may have to bite the bullet and "Learn" VB.net.
This is akin to driving an automatic transmission in a car, then learning how to drive a 18 speed manual transmission in a 18 Wheeler...
I have begun this process, ...but only in fits and starts.
Not easy my friend, ...but the new platform offers much more versatility.

Also note that some things in Access simply will not "Convert"
...for example, ..on the Tables side
Attachment fields
Hyperlinks
OLE fields
Multivalued fields
Lookup fields

On the automation side ,...I am not aware of any utility that will convert Access "Macros" to VB.net...

Here note that In Access your data (tables) and your interface (forms, ...etc) are wrapped in one application.
With .Net you will typically create your interface (in .net) and store the data in SQL server.
So now you have to add learning SQL server administration to your list...
...and getting deeper into the SQL query syntax
...and possibly learning a new reporting system
;-)

JeffCoachman
0
Gustav BrockCIOCommented:
Scott's first link is malware. CSIS Secure DNS blocks it as well.

However, I had a brief look on Evolution. It is not that smart. For example, this:
Public Function DateDiffWorkdays( _
    ByVal datDate1 As Date, _
    ByVal datDate2 As Date, _
    Optional ByVal booWorkOnHolidays As Boolean) _
    As Long

Open in new window

is converted to:
Friend Overridable Function DateDiffWorkdays(ByVal ByVal datDate1 As [Date], ByVal ByVal datDate2 As [Date], ByVal Optional ByVal booWorkOnHolidays As Boolean) As Object

Open in new window

where return type now is a generic object, and Date is not recognised as DateTime, and ByVal is doubled everywhere.

Still, it could be useful.

/gustav
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Scott's first link is malware. CSIS Secure DNS blocks it as well.
Yeah, that's why I appened _MALWARE to the link. Just wasn't sure if there was another download for it that may not be malware.
0
rflorencioAuthor Commented:
Hi Jeffrey,

In my case i know sql and vb.net. But i have an app in Access (But Database is SQLServer, not access) and  if i can´t convert, i have to write all the code in vb.net
0
Éric MoreauSenior .Net ConsultantCommented:
Even if you could find a converter, Access forms and reports don't have straight equivalence in the .Net world. A rewrite is the (sadly) the way to go!
0
AndyAinscowFreelance programmer / ConsultantCommented:
>>i have to write all the code in vb.net

Yep.  As I said in the very first comment two different things (VBA vs. VB.NET) and lots in Access that doesn't exist in .net
0
PatHartmanCommented:
What do you hope to accomplish with this conversion?  Are you even sure that it can be converted?  Access works very differently from VB.Net and the forms and reports might need to be completely different functionally if VB.Net doesn't support the type of interaction you would see in an Access app.

There are no useful tools because this is not something that is a high demand so there isn't sufficient money in it to expend the effort.  Given the differences in the environments, the best you could hope for is a partial conversion anyway.  You could of course, attempt your own.  You can export all the Access objects to text and see if you could use parts of the text exports to create VB.Net objects.  But, since events are different in the two environments, there won't be an easy way to transfer the code.
0
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
No points needed ---

I want to second and third what the other have said about the different between VBA Object Based not true OOP))  and . NET (True OOP) being so different hat you DO NOT want to attempt a conversion.

I have been a CoBOL, QBasic, Professional Basic, VB (thru version 6), VBA professional programmer since the mid 85.  In the past year I have started making the leap to .NET.  The Best Practices for Access VBA and Best Practices  and Design Patterns for .NET are so different .  

From other who have tried the code Access to VB6 or VB.net converts they do OK if you have NO VBA code or Macros.  If there is a lot of VBA code and/or Macros (2007 tends to use a lot of Embedded Macros)  then you will end up with at best (if you are lucky) about a 30-40% conversion.  Assuming you do not use any third-party control (Syncfusion, DevExpress, etc.)

You would probably be better off using Lightswitch or some code generator that will read the SQL Server database  and generate the VB.NET app that attempt some type of conversion application.  

n my case i know sql and vb.net. ... and  if i can´t convert, i have to write all the code in vb.net
If you are  VB.NET program then wite all the code yourself.

FWIW: The only way I would want it done is to redesign and build it  scratch following the Best Practices and Design Patterns for .NET.  This is a perfect time to re-engineer the design to end up with a much better solution.  Switching from Access to .NET   is the perfect time to redesign/re-engineer the application. In the long run you will have a much better solution.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rflorencioAuthor Commented:
Hi,

This application has thousands of lines of code. And honestly did not want to write all over again.

best regards
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
honestly did not want to write all over again
Unfortunately, there's just not much call for a utility like this, so you're basically stuck with doing just that.
0
Gustav BrockCIOCommented:
> honestly did not want to write all over again.

Some years ago I and a friend (Shamil) for fun took the challenge rewriting the good old Northwind demo database with focus on reporting which is so much different from Access.

The goal was to present exact replicas of the original forms and reports.

We nearly completed it (real work came across), and we did it in C# (the jump from VBA to C# is only a little more than to VB.NET, and so much more code and tutorials about C# is available) but it could be a good inspiration for you to judge to work to be done.

The project and full code is for download here:

Northwind.NET

Note please, that the newer versions of Visual Studio are free to use in the Community Edition.

/gustav
0
Jeffrey CoachmanMIS LiasonCommented:
And honestly did not want to write all over again.

Then, with no viable way to "Convert", ...whats your alternative then?

Else, explain this to your superior, and keep the app in Access for the time being.
Then investigate hiring a consultant or hiring a design firm to do the conversion...

We don't know of your other constraints here:
Time
Money
Technology available
...etc

So this is something you will have to grapple with...


JeffCoachman
0
AndyAinscowFreelance programmer / ConsultantCommented:
OK, so why convert it in that case?
The runtime version of access is free - so your access app will run on your end user PC's without them having to purchase any third party software.
0
PatHartmanCommented:
This application has thousands of lines of code. And honestly did not want to write all over again.
But WHY do you feel the need to convert in any case?  Has the business changed?  Is the app no longer working for you and it needs to be significantly modified?  Do you need to expand your user base to users outside your LAN?  Do you have spare time and need to fill it?  Do you have a lot of money to throw at a non-problem?
0
rflorencioAuthor Commented:
Hi,

I'm a Vb.net developer (Access as similar but not the same) and i have third party controls to specifc tasks i need to implement. And Access has  some limitations, and i'm not comfortable developing this tool.

best regards
0
AndyAinscowFreelance programmer / ConsultantCommented:
Decision time.
There isn't a tool.
Either leave it in access OR write a lot of code yourself OR start learning more about developing within aaccess.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.