implements, Interface problem

L

Le, Thanh-Nhan

Hi,
I define in Access 2000 some interfaces. In somes Form I implements theses
interfaces.

Now suddenly Access doesn't want compile my code. I don't know why. I am
sure, that my code is correct.
Access tell me: In this module the interface OnFormCalled_OK must be
implemented.

Thanks



My code:

'****** Interface IFormCall **************

Option Compare Database
Option Explicit

Public Sub OnFormCalled_OK(p_oForm As Form)
'
End Sub

Public Sub OnFormCalled_Cancel(p_oForm As Form)
'
End Sub

'****** Form Test **************

Option Compare Database
Option Explicit
Implements IFormCall

Private Sub IFormCall_OnFormCalled_OK(p_oForm As Form)
debug.print "###############"
End Sub
 
B

Brian

Le said:
Hi,
I define in Access 2000 some interfaces. In somes Form I implements theses
interfaces.

Now suddenly Access doesn't want compile my code. I don't know why. I am
sure, that my code is correct.
Access tell me: In this module the interface OnFormCalled_OK must be
implemented.

Thanks



My code:

'****** Interface IFormCall **************

Option Compare Database
Option Explicit

Public Sub OnFormCalled_OK(p_oForm As Form)
'
End Sub

Public Sub OnFormCalled_Cancel(p_oForm As Form)
'
End Sub

'****** Form Test **************

Option Compare Database
Option Explicit
Implements IFormCall

Private Sub IFormCall_OnFormCalled_OK(p_oForm As Form)
debug.print "###############"
End Sub

The compiler uses the underscore character as the delimiter between the
interface name and the procedure name, but it's too stupid to handle the
scenario where the procedure name contains an underscore. Try
"OnFormCalledOK" and "OnFormCalledCancel" as the procedure names.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top