G
Guest
I have the following function which is part of a module (modPerformance_PC)
which I would like to call using the on Click event of a button on a form.
However, when I use the button I get a message :Ambiguous name detected:
Del_performance_PC".
Here is the code for the function
Public Function Del_Performance_PC()
Dim msg As String
Dim Title As String
Dim response As String
stDelete = "DELETE Performance_PC.* From Performance_PC "
msg = "You are about to DELETE all records from Performance_PC!... Continue?"
Title = "Warning!"
response = MsgBox(msg, vbYesNo, Title)
If response = 7 Then
Exit Function
End If
CurrentDb.Execute stDelete
stDelete = "DELETE Performance_PC.* From All_Growth_Adjusted "
CurrentDb.Execute stDelete
MsgBox ("All Records Successfully Deleted From PC_Performance & All Growth
Adjusted")
End Function
The code associated with teh button is
Private Sub Command1_Click()
Del_Performance_PC
End Sub
which I would like to call using the on Click event of a button on a form.
However, when I use the button I get a message :Ambiguous name detected:
Del_performance_PC".
Here is the code for the function
Public Function Del_Performance_PC()
Dim msg As String
Dim Title As String
Dim response As String
stDelete = "DELETE Performance_PC.* From Performance_PC "
msg = "You are about to DELETE all records from Performance_PC!... Continue?"
Title = "Warning!"
response = MsgBox(msg, vbYesNo, Title)
If response = 7 Then
Exit Function
End If
CurrentDb.Execute stDelete
stDelete = "DELETE Performance_PC.* From All_Growth_Adjusted "
CurrentDb.Execute stDelete
MsgBox ("All Records Successfully Deleted From PC_Performance & All Growth
Adjusted")
End Function
The code associated with teh button is
Private Sub Command1_Click()
Del_Performance_PC
End Sub