Solved

Compiler Error

Posted on 1998-08-01
3
166 Views
Last Modified: 2010-05-03
Why does the compiler stop here.  The Data1 control is defined in the property box for itself so DBList can operate.  See the ">" for the location of compiler error.

Private Sub A()
    Dim Fake As Integer
End Sub

Private Sub DBList1_Click()
    DBList1.Recordset.Bookmark = DBList1.SelectedItem
End Sub
>>>>>>>Private Sub cmdFirst_Click()
    Data1.Recordset.MoveFirst
    Data1.BoundText = Data1.Recordset.Fields("Name").Value
End Sub
Private Sub cmdNext_Click()
    If Not Data1.Recordset.EOF Then
        Data1.Recordset.MoveNext
        If Data1.Recordset.EOF Then
            Data1.Recordset.MovePrevious
        End If
        Data1.BoundText = Data1.Recordset.Fields("Name").Value
    End If
End Sub
Private Sub cmdPrev_Click()
    If Not Data1.Recordset.BOF Then
        Data1.Recordset.MovePrevious
        If Data1.Recordset.BOF Then
            Data1.Recordset.MoveNext
        End If
        Data1.BoundText = Data1.Recordset.Fields("Name").Value
    End If
End Sub
Private Sub cmdLast_Click()
    Data1.Recordset.MoveLast
    Data1.BoundText = Data1.Recordset.Fields("Name").Value
End Sub



0
Comment
Question by:optical
3 Comments
 

Author Comment

by:optical
ID: 1467433
Thank you.
0
 
LVL 2

Expert Comment

by:percosolator
ID: 1467434
what error message are you getting?  the compiler should give you a reason why it stopped.
0
 
LVL 2

Accepted Solution

by:
swilt earned 50 total points
ID: 1467435
If the error is 'Procedure declaration does not match description of event or procedure having same name' then select the button cmdFirst at design time and change the 'index' is the properties to nothing i.e. deleted anything that is there, the index property denotes that the button is in a control array
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now