On Mon, 31 Oct 2005 00:25:28 GMT, Bob Quintal <rq******@sympatico.ca>
wrote:
Smartin <sm********@yahoo.com> wrote in
news:w9********************@giganews.com:
Wayne Gillespie wrote:
Use -
If (Me!InpassingWerkproces= "")
instead of
If (Me!InpassingWerkproces.Text = "")
The Text property is only available if the control has
focus...
I've noticed this too and have been puzzled by it. Isn't Text
the default property of a TextBox?
The default value of any control that can be bound to a field is
.value. At least the rule is consistent.
The .text property contains whatever the user has typed into a
control, for editing. since it can only be edited when the
control has focus, the property is only accessible when the
control has focus.
OK, I've tried various possibilities out, in the hope that it gives
useful information to future browsers of the archive. The following
works, i.e. it suppresses labels for empty fields in my report:
If IsNull(Me!ExtraInfo) Then
Me!ExtraInfo_Bijschrift.Visible = False
Else
Me!ExtraInfo_Bijschrift.Visible = True
End If
Using IsNull(Me!ExtraInfo.Value) also works.
(Me!ExtraInfo = "") and (Me!ExtraInfo.Value = "") do not work for me. I
don't know whether one can get a zero-length string in an Access field -
I don't seem to have them, anyway.
(Me!ExtraInfo.Text = "") should not work at all in reports according to
you and Rick, yet sometimes it does - see my original post. But, as I
discovered, it's not reliable and presumably should be avoided in
reports.
I would hazard a guess that at some stage someone at Microsoft thought
it would be handy to provide Text as a synonym to Value in reports, for
people who are used to VB. But if so, the idea was never carried through
consistently (and it seems a pretty bad idea to me anyway).
--
Stephen Poley