VB.Net with MS Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using VBA with MS Access. Is it possible to using VB.Net on Access? Any useful links explaining this?
 
WC Lo said:
I am using VBA with MS Access. Is it possible to using VB.Net on
Access? Any useful links explaining this?


Depends on what parts of Access you are talking about. In general, VB.Net
can access database by ADO.Net and an OLEDB provider, in this case the Jet
provider, for accessing the database. This does /not/ include the modules,
forms and reports stuff that the Access application makes use of. The 2nd
way is that you can use COM components (by COM interop) from VB.Net. You'd
have to set a reference to the Access automation library. The automation
model, documented in the Access documentation, can then be used.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
I am not sure if I really understand you. Currently Access has forms and reports and can access either Jet or SQL database. Within Access forms or reports, I can write VBA codes with events or modules. My question is, is it possible to use VB.Net instead of VBA inside forms or reports?
 
WC Lo said:
I am not sure if I really understand you. Currently Access has forms
and reports and can access either Jet or SQL database. Within Access
forms or reports, I can write VBA codes with events or modules. My
question is, is it possible to use VB.Net instead of VBA inside forms
or reports?

Now I am also not sure if I really understand you. Do you want to access
Access/Access database from a VB.Net application or the other way round? I
guess, in VBA, within Access, you can reference COM components. Yes, it is
possible to expose .Net assemblies via COM interop:

Interop chapters:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconinteroperatingwithunmanagedcode.asp

Especially sub topic "Exposing .NET Framework Components to COM"

And:
http://msdn.microsoft.com/library/en-us/vbcon/html/vbconCOMInteropInVisualBasicVisualC.asp

Does this help? More Interop: microsoft.public.dotnet.framework.interop

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Hi WC,

I think not, I think that those are more questions for an office developer
newsgroup.

microsoft.public.office.developer (there are more)

The link I was sending you was to integrate office in VB.net and not in the
opposite way as you are in my idea asking for.

Cor
Thanks Armin and Cor. I am not so sure that we really fully understand
each other. Anyway very appreciated of your information. May be I explain
a bit more. In Access when I bulid a form, there are events and I can write
VBA codes in the event procedure. My question is, instead of VBA, can I
write VB.Net codes in the event procedure? If so, how to reference to
VB.NET library in Access?
 
¤ I am using VBA with MS Access. Is it possible to using VB.Net on Access? Any useful links explaining this?

This is about as close as .NET comes to Microsoft Office for the time being:

Introducing Microsoft Visual Studio Tools for the Microsoft Office System
http://msdn.microsoft.com/vstudio/office/officetools.aspx

Microsoft Office has not been .NETified yet but likely will be in a future version.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top