By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

.Net Class in Access 2000

P: n/a
I have written an VB.net class and would love to use it in Access2000.
Anyone ever done this?

It won't let me simply add a refrence.
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Yes. First, in the project Configuration properties, make sure you have
checked Register for COM Interop so that when you build the project (or
rebuild) you have a dll and tlb file for your class. Next, in Access
you will make a reference to the tlb file (type library file) that you
create in your .net project. Now you should be able to reference all
the properties and stuff from your class in Access assuming your .net
class compiled correctly.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #2

P: n/a
Interesting! What does your class do?
Ruben

"Peter" <pe***@mclinn.com> wrote in message
news:dc**************************@posting.google.c om...
I have written an VB.net class and would love to use it in Access2000.
Anyone ever done this?

It won't let me simply add a refrence.

Nov 12 '05 #3

P: n/a
I took the time to write an easy to use encryption class. It
impliments XOR, Tripple-DES, Bolwfish, and Rijndael standards. I may
add in more standards shortly after my software launch.

Use:
myEncryption.blowfish(String to Encrypt, Your Key/Password)
or myDecryption.blowfish(String to Decrypt, Your Key/Passowrd)

I also have standards that allow you to set the bits. I got so mad
that companies are charging $99.00 to $500 for the classes and they
are public standards. The class will be availble for sale next week
@ www.mclinn.com for around $15 for a single chair License or $30 for
a distributable License. Without even purchasing it the trial will
allow you to use XOR Encyption/Decryption. The website and database
will be up soon.

-Peter

"R Baumann" <ry**@9yahoo.com> wrote in message news:<zb********************@megapath.net>...
Interesting! What does your class do?
Ruben

Nov 12 '05 #4

P: n/a
Rich,

What is the syntax for this reference?

Rich P <rp*****@aol.com> wrote in message news:<40*********************@news.frii.net>...
Yes. First, in the project Configuration properties, make sure you have
checked Register for COM Interop so that when you build the project (or
rebuild) you have a dll and tlb file for your class. Next, in Access
you will make a reference to the tlb file (type library file) that you
create in your .net project. Now you should be able to reference all
the properties and stuff from your class in Access assuming your .net
class compiled correctly.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #5

P: n/a
Well, inside your vb.net class you want to prefix your routines and
properties like this:

Imports System.Runtime.InteropServices
Imports System.Windows.Forms

Public Class yourClass 'classname -->yourClass
'note: Imports System.Windows.Forms for using MsgBox func

Private strName As String

Public Sub New()
'initialize private var in constructor
strName = "Anonymous
'note: don't need <ComVisible(True> _ in constructor
End Sub

<ComVisible(True)> _
Public Sub Test1()
MsgBox "Test from vb.net " & strName
End Sub

<ComVisible(True)> _
Public Property testName()
Get
Return strName
End Get
Set(ByVal Value As String)
strName = Value
End Set
End Property
End Class

After making a reference to yourClass.tlb in Access, in a code module
(form or standard) you can do this:

Sub testTLB()
Dim p As yourClass
p.testName "Bill"
Debug.Print p.TestName
Call p.Test1
End Sub

so sub testTLB will print Bill in the Debug window and will bring up a
message box saying

"Test from vb.net Bill

Note: the real horsepower in .Net dlls is in being able to use .Net
functionality outside of .Net like being able to use DataAdapters,
Datasets, etc in Access. No more having to loop through recordsets
between Sql Server and Access or Oracle and Access, etc. being able to
use inheritance, and multithreading straight in Access through a .Net
dll of your design!

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #6

P: n/a
I am looking to do quite a bit of this type of thing (compiling .NET DLLs
for use in an Access front end). I am fairly familiar with .NET and VB but
haven't done much with dlls or components. Can anyone recommend a book on
how to create .NET dlls and use them within Access?

Thanks,

-David Price

"Rich P" <rp*****@aol.com> wrote in message
news:40*********************@news.frii.net...
Well, inside your vb.net class you want to prefix your routines and
properties like this:

Imports System.Runtime.InteropServices
Imports System.Windows.Forms

Public Class yourClass 'classname -->yourClass
'note: Imports System.Windows.Forms for using MsgBox func

Private strName As String

Public Sub New()
'initialize private var in constructor
strName = "Anonymous
'note: don't need <ComVisible(True> _ in constructor
End Sub

<ComVisible(True)> _
Public Sub Test1()
MsgBox "Test from vb.net " & strName
End Sub

<ComVisible(True)> _
Public Property testName()
Get
Return strName
End Get
Set(ByVal Value As String)
strName = Value
End Set
End Property
End Class

After making a reference to yourClass.tlb in Access, in a code module
(form or standard) you can do this:

Sub testTLB()
Dim p As yourClass
p.testName "Bill"
Debug.Print p.TestName
Call p.Test1
End Sub

so sub testTLB will print Bill in the Debug window and will bring up a
message box saying

"Test from vb.net Bill

Note: the real horsepower in .Net dlls is in being able to use .Net
functionality outside of .Net like being able to use DataAdapters,
Datasets, etc in Access. No more having to loop through recordsets
between Sql Server and Access or Oracle and Access, etc. being able to
use inheritance, and multithreading straight in Access through a .Net
dll of your design!

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.