Error in loading DLL & Invalid or Unqualified Reference

Hello

I am giving my code for the  Visual Basic program prgram. Its a simple program using data control and few buttons.

Its in VB 6. The Database used is MS ACCESS and the database name is Biblio.mdb

I am getting the following errors when i am running the program

Its coming Compile Error : Error in Loading  DLL . If i am clicking on the Previous and Last Button.

and If i am clicking on the First and Next Button its  coming  Compile Error : Invalid or Unqualified Reference.

Please provide me a solution for the problem




Private Sub cmdFirst_Click()
Data1.Recordset .MoveFirst
End Sub

Private Sub cmdLast_Click()
Data1.Recordset.MoveLast
End Sub

Private Sub cmdNext_Click()
Data1.Recordset .MoveNext
If Data1.Recordset . EOF Then

MsgBox "You are on the last Record"
Data1.Recordset.MoveLast
End If

End Sub

Private Sub cmdPrevious_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset .BOF Then
MsgBox "You are on the First"
Data1.Recordset.MoveFirst
End If

End Sub

*******
babloo26Asked:
Who is Participating?
 
rpaiConnect With a Mentor Commented:
'Error is Loading' is caused because one of the following reasons -

The file isn't DLL-executable.
Solution:  If the file is a source-text file, it must be compiled and linked to DLL executable form.

The file isn't a Microsoft Windows DLL.
Solution:  Obtain the Microsoft Windows DLL equivalent of the file.

The file is an early Microsoft Windows DLL that is incompatible with Microsoft Windows protect mode.
Solution:  Obtain an updated version of the DLL.

The DLL references another DLL that isn't present.
Solution:  Obtain the referenced DLL and make it available to the other DLL.

The DLL or one of the referenced DLLs isn't in a directory specified by your path.
Solution:  Move the DLL to a referenced directory or place its current directory on the path.

You can diagonise the error using the lines of code mentioned here:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q142814

There error code will tell you the exact reason why the DLL fails to load.

Hope this helps.


0
 
rpaiCommented:
Please make sure that the data control you are using is registered correctly on the machine.
0
 
BlueCodeCommented:
Change the two procedures as:

Private Sub cmdNext_Click()
If Data1.Recordset . EOF Then
  MsgBox "You are on the last Record"
  Data1.Recordset.MoveLast
Else
  Data1.Recordset .MoveNext
End If

End Sub

Private Sub cmdPrevious_Click()
If Data1.Recordset .BOF Then
  MsgBox "You are on the First"
  Data1.Recordset.MoveFirst
Else
  Data1.Recordset.MovePrevious
End If



End Sub
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
babloo26Author Commented:
Hello

rpai
*****

The data control i am using is the data control which comes with VB 6.0 and is in the tool box. Its a simple data control. If i have to register is how do i do it


Blue code
********

The code u have provided is not working .

The same error is coming ie Error in loading DLL


Babloo
0
 
DanRollinsCommented:
Hi babloo26,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept rpai's comment(s) as an answer.

babloo26, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0
All Courses

From novice to tech pro — start learning today.