Hi
im trying to figure out whats best to make my Cancel button aktive.
CAncel can only be used if something is really changed (otherwise access gives me an error)
So i thought of following:
count all fields an if it the number changes... aktivate the cancel button
so far I have
it works fine until a textbox is empty...
It must be easy but right now I cant figure out. What am I missing.
it errors ofcourse in this part --> strInhoud = 0
anyone suggestions?
thx
Al
im trying to figure out whats best to make my Cancel button aktive.
CAncel can only be used if something is really changed (otherwise access gives me an error)
So i thought of following:
count all fields an if it the number changes... aktivate the cancel button
so far I have
Dim strText As String
Dim strString As String
Dim lngAantal As Long
Dim cnt As Byte
Dim lngTotaal As Long
Dim strInhoud As String
lngTotaal = 0
For cnt = 1 To 14
lngAantal = 0
strText = "txtAdr" & cnt
strInhoud = Nz(Me.Controls(strText), 0)
If strInhoud = 0 Then
lngAantal = Len(strInhoud) - 1
Else
lngAantal = Len(strInhoud)
End If
lngTotaal = lngTotaal + lngAantal
Text116 = lngTotaal
Next cnt
Dim strString As String
Dim lngAantal As Long
Dim cnt As Byte
Dim lngTotaal As Long
Dim strInhoud As String
lngTotaal = 0
For cnt = 1 To 14
lngAantal = 0
strText = "txtAdr" & cnt
strInhoud = Nz(Me.Controls(strText), 0)
If strInhoud = 0 Then
lngAantal = Len(strInhoud) - 1
Else
lngAantal = Len(strInhoud)
End If
lngTotaal = lngTotaal + lngAantal
Text116 = lngTotaal
Next cnt
it works fine until a textbox is empty...
It must be easy but right now I cant figure out. What am I missing.
it errors ofcourse in this part --> strInhoud = 0
anyone suggestions?
thx
Al