Code:
The expression On Click you entered as the event property setting produced the following error: Procedure declaration does not match description of event or procedure having the same name
Now this is the error message that I am constantly getting from any command button I hit on a certain form. Here is the code of the form.
Code:
Option Compare Database
Option Explicit
Public inputCSV As String, ORG As String
Private Sub CopyToTableBt_Click()
Debug.Print "Sub Execute calling ImportCSVForConfederation inputCSV="; inputCSV; " ORG="; ORG
ImportCSVForConfederation Me.CSVs, ORG
End Sub
Private Sub ExploreWindowBt_Click()
inputCSV = GetCSVFile
Me.CSVs = inputCSV
End Sub
Private Sub CheckInterBt_Click()
DoCmd.OpenTable "TransTbl", acViewNormal, acEdit
End Sub
Private Sub OrListBx_Click()
Dim organ As String
organ = Me.OrListBx.Value
Select Case organ
Case "SHAPEX"
ORG = "SH"
Case "NAREX"
ORG = "NA"
Case "AGERX"
ORG = "AG"
Case "OTHERS"
ORG = "OT"
End Select
Debug.Print "Sub OrList ORG="; ORG
End Sub
Private Sub ClosingBt_Click()
On Error GoTo Err_ClosingBt_Click
If Me.Dirty Then Me.Dirty = False
DoCmd.Close
Exit_ClosingBt_Click:
Exit Sub
Err_ClosingBt_Click:
MsgBox Err.Description
Resume Exit_ClosingBt_Click
End Sub
Private Sub UpdateARODBBt_Click(ORG)
UpdateWithConfederation
End Sub
I changed the names of the buttons, reconstructed the code under those names, went to the modules and changed names, made sure that a sub o function name is not duplicated in the project... But helas the error is still there. It used to work and suddenly does not work. Help Please.