Bold part is the problem that a
Want to please everybody can help have a look at is where there is a problem, how to solve, the database is Access
'perform database operations statement
Public Sub SQLExt (ByVal TmpSQLstmt As String)
'create the Command object CMD
Dim CMD As New ADODB.Com mand
'to connect to the databaseDB_Connect
'set the ActiveConnection property of CMD specifies the database connection associated with
The Set CMD. The ActiveConnection=CNN
'set up to perform the command text
Cmd.Com mandText=TmpSQLstmt
'MsgBox TmpSQLstmt
'execute the command
CMD. The Execute
'empty CMD object
The Set of CMD=Nothing
'disconnects from the database connection
DB_Disconnect
End Sub
In the following code is to remove the information appeared, prompt type does not match, the statement also bold, I am just learning is not much, the trouble you teach,
Private Sub Cmd_Del_Click ()
If Adodc1. You. EOF=True Then
MsgBox "please select a record
"The Exit Sub
End the If
If MsgBox (" whether to delete the current record?" , vbYesNo, "confirmed")=vbYes Then
Call MyContact. Delete (Adodc1. You. Fields (0))
RefreshSaleChance
End the If
End Sub
CodePudding user response:
MyContact. Delete this method didn't stick, don't know what's wrong,CodePudding user response:
Hello, I want to ask, you say what mean? I don't quite understandCodePudding user response:
All commented On the Error Resume Next statement, in VB6 IDE,The error and then click the debugging, the cursor will stop error in the statement,
Or
In doubt may have a logical error statements in advance to set breakpoints, run through the breakpoint interrupt,
At this point can be used in the immediate window
? The variable name
Or
? The function name () function parameter
Or
Process (parameters)
Auxiliary debugging,