Hie ich soll in Access den Bremsweg brechenen und hab folgendes eingegeben
Private Sub Befehl7_Click()
km = Null
brems = Null
End Sub
Private Sub butberechnen_Click()
Dim txtbrems As Single
Dim txtkm_h As Integer
txtkm = km
txtbrems = (km / 3.6) ^ 2
brems = txtbrems
If zustand = "Trocken" Then
txtbrems = (km / 3.6) ^ 2 / (7.5 * 2 * 1)
ElseIf zustand = "Nass" Then
txtbrems = (km / 3.6) ^ 2 / (7.5 * 2 * 0.75)
ElseIf zustand = "Schneebedeckt" Then
txtbrems = (km / 3.6) ^ 2 / (7.5 * 2 * 0.35)
ElseIf zustand = "Eisig" Then
txtbrems = (km / 3.6) ^ 2 / (7.5 * 2 * 0.15)
End If
End Sub
Meine Buttons heißen
brems, zustand und km
Ich weiß nicht warum das programm nicht rechnet entweder kommt nichts raus oder er schreibt eine null hin.
|