473,320 Members | 2,161 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,320 software developers and data experts.

How do I use MD5 hash class module

I am trying to use the code provided in Generate secure user passwords using the MD5 hash class module.

When trying to use this method I get the following error: Sub or function not defined. I'm a newbie when it comes to VBA and working with classes. How do I import the attached class and how do I remedy the error I'm receiving?
Oct 24 '11 #1
1 2870
ADezii
8,834 Expert 8TB
@topher23:
If the code breaks, the recordset stays in memory, which is the only thing I dislike about recordsets.
You can neatly and efficiently check and see if a Recordset still remains in Memory after an Error occurs. The following Code will:
  1. Create a Type Mismatch Error immediately after a Recordset has been created.
  2. Code execution now branches to the Error Handler where it tests to see if the Recordset Object still exists, and if so Closes it and releases the Memory allocated to rst.
  3. The first Message Box will display Recordset Object IN in Memory, while the second will display Recordset Object NOT in Memory.
    Expand|Select|Wrap|Line Numbers
    1. Private Sub cmdNext_Click()
    2. On Error GoTo Err_cmdNext
    3. Dim MyDB As DAO.Database
    4. Dim rst As DAO.Recordset
    5.  
    6. Set MyDB = CurrentDb
    7. Set rst = MyDB.OpenRecordset("Employees", dbOpenDynaset)
    8.  
    9. Err.Raise 13        'Type Mismatch
    10.  
    11. Exit_cmdNext:
    12.   Exit Sub
    13.  
    14. Err_cmdNext:
    15.   MsgBox IIf(rst Is Nothing, "Recordset Object NOT in Memory", "Recordset Object IN in Memory")
    16.     If Not rst Is Nothing Then
    17.       rst.Close
    18.         Set rst = Nothing
    19.     End If
    20.   MsgBox IIf(rst Is Nothing, "Recordset Object NOT in Memory", "Recordset Object IN in Memory")
    21.       Resume Exit_cmdNext
    22. End Sub
Oct 24 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

42
by: WindAndWaves | last post by:
Dear All Can you tell me why you use a class module??? Thank you Nicolaas ---
3
by: Johnny M | last post by:
using Access 2003 Pardon the subject line, but I don't have a better word for this strange behavior (or behavior I don't understand!!!) I have a class module named DepreciationFactor. One of...
4
by: Brad Parks | last post by:
Are there any performance or memory-usage benefits of placing public functions and subroutines in a Class Module rather than a standard module?
4
by: downwitch | last post by:
Hi all, Wondering if there is a way to determine that a given module is a class module or not. In looping through the AllModules collection, it would be useful for me to do different things...
3
by: Peter Afonin | last post by:
Hello, I put the connection string to the Web.config file, then in Global.asax I'm assigning this string to the application variable: cn = New OracleConnection cn.ConnectionString =...
6
by: JonathanOrlev | last post by:
Hello everyone, I have a newbe question: In Access (2003) VBA, what is the difference between a Module and a Class Module in the VBA development environment? If I remember correctly, new...
0
ADezii
by: ADezii | last post by:
The motivation for this Tip was a question asked by one of our Resident Experts, FishVal. The question was: How to Declare Default Method/Property in a Class Module? My response to the question was...
0
by: VaBa | last post by:
Hi, Need some help.. I have a VBA class module in MS ACCESS. In the same MS ACCESS app, I am calling a .NET DLL (which i have exposed as COM-visible) and passing BYREF an instance of the VBA class...
1
by: Fred | last post by:
****This message has been posted in microsoft.public.dotnet.framework several days before and received no reply, so I post it here, sorry if you get duplicate messages**** Hi, all: I'm new to...
5
topher23
by: topher23 | last post by:
I've seen a lot of questions about how to make secure database passwords. I'm going to go over a method of encrypting a password using the MD5 encryption algorithm for maximum security. First,...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.