edo janssen
Registered User.
- Local time
- Today, 20:59
- Joined
- Oct 29, 2010
- Messages
- 16
When I cancel the inputbox of if i leave the inputbox empty and click on OK I get a type mismatch error. The field OBNVac is a currency field.
Who can help me out?
Who can help me out?
Code:
[/SIZE][/FONT][FONT=Arial][SIZE=2]Dim Controle As Integer
Dim sInputE As Currency
Controle = DLookup("OBNVac", "tblHeffingTarief", "Jaar = " & "[Tekst0]")
If Controle = "0" Then
Inputbox:
sInputE = Inputbox("Het tarief voor de vacatiegelden van " & Me.Tekst0 & " is" & vbCrLf & _
"nog niet ingevuld. Geef het bedrag op!", "Tarief vacatiegeld OBN")
DoCmd.RunSQL "Update tblHeffingTarief SET OBNVac='" & sInputE & "' WHERE Jaar=" & Me.Tekst0 & ";"
If sInputE = vbCancel Then
sInputE = 0
Exit Sub
[/SIZE][/FONT]
[FONT=Arial][SIZE=2]