473,382 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

.Net Class in Access 2000

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
6 2277
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RichGolebiowski | last post by:
I have a class library (clsTestLib) that was created in VB.Net that I would like to use in Access 2000. I created a typelib for the class using regasm.exe. I am able to refernce (add a reference)...
4
by: Scott Dillard | last post by:
I have recently been provided with a new laptop. The old one ran Win 2000 with Access 2000 and the new one runs Win XP with Access 2000. When I try to run some of my modules in my old databases on...
2
by: Scott | last post by:
Any help would be grateful :-) Problem: When I test my installation of Access 2000 MDE, I get the following error: "Unrecognised Format".. This means that Access 97 cannot read Access 2000. ...
2
by: Jeff | last post by:
Does anyone know of any potential problems running a 2000 database with 2003? Also, what about installing all other Office products as 2003 versions but leaving Access as 2002 running a 2000...
4
by: Br | last post by:
We're using an Access2000 ADP with an SQL2000 back-end. Because SQL2000 was released after Access2000 you need to be running Access2000 SP1 (2 or 3) for it to work properly. Is there an easy way...
47
by: ship | last post by:
Hi We need some advice: We are thinking of upgrading our Access database from Access 2000 to Access 2004. How stable is MS Office 2003? (particularly Access 2003). We are just a small...
0
by: com | last post by:
MS Access 2000 Password Recoverer 4.2 Screenshot - Soft30.com MS Access 2000 Password Recoverer will display the password to a MS Access database (*.mdb). This program works for MS Access files...
10
by: Goran Djuranovic | last post by:
Hi all, Does anyone know how to declare a variable in a class to be accessible ONLY from a classes instantiated within that class? For example: ************* CODE ***************** Public...
9
by: subramanian | last post by:
I am a beginner in C++. Suppose I want to build a class: I have given below the starting code: class Date { int day, month, year; static Date default_date; };
3
by: NEWSGROUPS | last post by:
I am in the midst of trying to convert about 25 Access 2000 to Access 2003. The new environment consists of Office/Access 2003 and Outlook 2003. When converting the back ends I have no problems....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.