If Else statment not wokring

J

Joel

In an After Update VB code i have this:

If Structural = Yes Then (Structural is a checkbox)
Me.[010] = "X"
Else
Me.[010] = ""
End If

It will store the X but if i uncheck the box it wont erase the X.
Any idea?

Thanks!
 
G

George Nicholson

In table design, is "Allow Zero Length" set to Yes for field [010]?
If it is set to No then your code is trying to assign an invalid value to
the field (a zero length string) and it won't over write the current value
(X).

HTH,
 
J

Joel

That was it, Thank You George

George Nicholson said:
In table design, is "Allow Zero Length" set to Yes for field [010]?
If it is set to No then your code is trying to assign an invalid value to
the field (a zero length string) and it won't over write the current value
(X).

HTH,
--
George Nicholson

Remove 'Junk' from return address.


Joel said:
In an After Update VB code i have this:

If Structural = Yes Then (Structural is a checkbox)
Me.[010] = "X"
Else
Me.[010] = ""
End If

It will store the X but if i uncheck the box it wont erase the X.
Any idea?

Thanks!
 
Top