SetValue for Text Box

  • Thread starter Thread starter marrek
  • Start date Start date
M

marrek

Hi all

I posted a similar question on the macro's form.

My question is, when a text box is populated with #Error
(from another setValue macro - so the box is unbound),
what value is in the text box? (it is not "#Error")

[text box]="#Error" is false
IsNull[Text box] is false
Not IsNull[Text Box] is true

I want to write a condition that is true when #Error is
present in the box, but I can't.

I can manually delete and replace the #Error, but want to
do it automatically with another setValue macro. I need
to have a conditional statement which is set to true when
the #Error is present.

Any ideas would be greatly appreciated.

Marrek
 
You are assuming that the visible "#Error" message, corresponds to a special
"error" value in the control. But that assumption is not necessarily true.

The "displayed" value of a textbox control, is quite seperate from the
"stored" value of that control. Maybe Access just displays the "#Error"
message, and leave the current "actual" value unchanged. So the answer to
your question might be, "There is no such value!".

Try IsError(), but I doubt that will work. (I don't have Access here to
check.)

marrek, a fundamental disadvantage of using macros (as compared to VBA
code), is the difficulty of handling errors properly. I'm sure most regular
posters would encourage you to mive away from macros, and start using VBA.

HTH,
TC
 
Back
Top