Link to home
Start Free TrialLog in
Avatar of rp
rpFlag for Portugal

asked on

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
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

No.
Two very different languages (syntax, program structure...) and loads of objects in Access that don't exist in .net.
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.
There is no more VB6-to-.Net converter in the box so I wouldn't expect much from an Access-to-.Net converter!
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
SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of rp

ASKER

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
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!
>>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
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.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rp

ASKER

Hi,

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

best regards
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.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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?
Avatar of rp

ASKER

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
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.