Estoy tratando aprender Visual Basic
lo que quisiera saber es como hago para sumar un campo de la base de datos (Banco) y la tabla (tblDeudores) en With tblDeudores me da error (variable no definida) ????
Les pego lo que hice
Código vb:
Ver originalOption Explicit
Private Sub Cmdcalcular_Click()
On Error GoTo Error:
Dim total
Dim x
With tblDeudores
.Requery
.MoveFirst
For x = 1 To .RecordCount
total = total + saldo
If x = .RecordCount Then
txttotal.Text = Format(total, "#0.00")
Else
.MoveNext
End If
Next
End With
Error:
MsgBox "Error : " & Err.Description
Resume Next
End Sub
Private Sub cmdSalir_Click()
End
End Sub