Error in loading dll

smiler

Registered User.
Local time
Yesterday, 21:48
Joined
Mar 24, 2011
Messages
10
Hi friends,
I have a small Access 2007 database application for storing record of patients at a small health center. I have been using it for sometime and wish to include a search functionality to it. After adding the new lines of code the application now behaves strangely when the search button is clicked. I get this error message (Error in loading Dll). The code i added is shown below:
Code:
Private Sub Btn_Search_Click()
    Dim suchstr As String
    suchstr = InputBox("Enter the Patient Last Name to be found", "Search by Last Name", "A")
    If suchstr <> "" Then
        suchstr = suchstr & "*"
        Me![Ufo_Patientenliste].Form.Filter = "PLastName Like '" & suchstr & "'"
        Me![Ufo_Patientenliste].Form.FilterOn = True
    Else
        Me![Ufo_Patientenliste].Form.FilterOn = False
    End If
End Sub

I also noticed that pops up the code window in debug mode when i try clicking the OK button of the error message window repeatedly. In the code, i realized that "Btn" in the first line of code has been changed to "Bnt" and always comes back when i try correcting it. Please any form of help on this will be greatly appreciated. I just don't know what to do any more.:confused:
 
What happens when you:

1. Remove this code you added completely
2. Remove the button from the form
3. Debug > Compile the code in the VBA editor

?
 
Now the problem has gone from bad to worse. When I try to open the Access file, the login form cannot even come up. All i get is the same error message: Error in loading DLL. I manage to get to the code window and removed the code i added earlier but still the error persist. I hope you can help me.
Thanks for the quick reply.
 
In the VBA editor, i.e. the white sheet where you write code, go to Tools > References and tell us the ones that are MISSING and ticked.
 

Users who are viewing this thread

Back
Top Bottom