Visual basic debugger help needed for form

  • Thread starter Thread starter Tene
  • Start date Start date
T

Tene

Hi,

In my database I recieved an error message when I tried to
open my switchboard. The error takes me to the debugger
and reads:

Compile error:
Ambiguous name detected: Go_to_next_record_Click

The debugger section reads:

Private Sub Go_to_next_record_Click()
On Error GoTo Err_Go_to_next_record_Click


DoCmd.GoToRecord , , acNext

Exit_Go_to_next_record_Click:
Exit Sub

Err_Go_to_next_record_Click:
MsgBox Err.Description
Resume Exit_Go_to_next_record_Click

End Sub

The line Private Sub Go_to_next_record_Click() is
highlighted.

As there are none of these buttons on my four switchboards
I am guessing that it refers to my forms.

FI anyone could help me sort out this problem I would be
very grateful. As an A Level Student my knowledge of
Visual Basic is close to nothing.

Thanks,
Tene
 
Means there are probably two subs with the name Go_to_next_record_Click

Look around in the VB module for the other one, and delete it.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
Hi,
This usually means that you have 2 Subs with the same name, so...
you must have 2 Sub routines called:
Go_to_next_record_Click

delete one of them.
 
Tene,

do a search of all your modules in your database on the
text it says is duplicating:

Find

"Go_to_next_record_Click"

in Current Database

This procedure _must_ exist more than once for the module
to be generating this error. If you've got a Public
version of this code in another module, that may be
causing the error.

Hope that helps.


Damien
 
Back
Top