If Else statment not wokring

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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,
 
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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top