Documente Academic
Documente Profesional
Documente Cultură
Unload Me
menu1.Show
End Sub
COSTOXKM = Val(Text8.Text)
BANDERA1 = Val(Text7.Text)
BANDERA2 = Val(Text9.Text)
BANDERA3 = Val(Text10.Text)
KMPISTA = Val(Text3.Text)
KMLIBRE = Val(Text4.Text)
CASETAS = Val(Text6.Text)
End Sub
End Sub
End Sub
Private Sub LIBRE_Click()
ACTUALIZAR
KILOMETRAJE = 0
BANDERZO = 0
Label8 = ""
Label14 = ""
SUMAC = 0
KMLIBRE = Val(Text4.Text)
KILOMETRAJE = KMLIBRE
'MsgBox KILOMETRAJE
If KILOMETRAJE >= 0 And KILOMETRAJE <= 50 Then
BANDERZO = BANDERA1
Label12 = Format(Str(BANDERZO), "$###,###,###,###.00")
ElseIf KILOMETRAJE >= 51 And KILOMETRAJE <= 100 Then
BANDERZO = BANDERA2
Label12 = Format(Str(BANDERZO), "$###,###,###,###.00")
Else
BANDERZO = BANDERA3
Label12 = Format(Str(BANDERZO), "$###,###,###,###.00")
End If
End Sub
End Sub
Private Sub ACTUALIZAR()
COSTOXKM = Val(Text8.Text)
BANDERA1 = Val(Text7.Text)
BANDERA2 = Val(Text9.Text)
BANDERA3 = Val(Text10.Text)
KMPISTA = Val(Text3.Text)
KMLIBRE = Val(Text4.Text)
CASETAS = Val(Text6.Text)
End Sub
TextBox4.Text = ""
If Adodc1.Recordset.EOF Then
MsgBox "DESTINO NO ENCONTRADO", vbCritical, "mensaje"
Else
Adodc1.Caption = Adodc1.RecordSource
End If
End Sub
Adodc1.Refresh
DataGrid1.Refresh
Adodc1.RecordSource = "select * from BDATOS where DESTINO like '%" & TextBox4 &
"%'"
Adodc1.Refresh
'TextBox4.Text = ""
If Adodc1.Recordset.EOF Then
MsgBox "DESTINO NO ENCONTRADO", vbCritical, "mensaje"
Else
Adodc1.Caption = Adodc1.RecordSource
End If
'With Adodc1
' If TextBox4.Text <> "" Then
' Adodc1.RecordSource = "select * from BDATOS where DESTINO like '%" &
TextBox4.Text & "%'"
' Set DataGrid1.DataSource = Adodc1.Recordset
' Else
' Adodc1.Recordset.Filter = ""
' Adodc1.RecordSource = "select * from BDATOS where DESTINO"
' Adodc1.Refresh
' Adodc1.Caption = Adodc1.RecordSource
' End If
'Adodc1.Refresh
'End With
Exit Sub
SALIR:
If Err.Number = 3265 Then
MsgBox "EL CAMPO SELECCIONADO NO ES VALIDO", vbCritical
Else
MsgBox Err.Description, vbCritical
End If
End Sub