Re: Strange report error message - control must have focus
- From: Bob Quintal <rquintal@xxxxxxxxxxxx>
- Date: Mon, 31 Oct 2005 00:25:28 GMT
Smartin <smartin108@xxxxxxxxx> wrote in
news:w9Gdna10-4sKz_jeRVn-uA@xxxxxxxxxxxx:
> 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.
>
> So other than the fact that one way works and the other does
> not, what is the difference between these two statements?
>
> txtMyText = "foo"
> txtMyText.Text = "bar"
>
txtMyText refers to the bound value,
as does txtmytext = 99
txtMyText.Text = "bar" refers to the value of txtMytext while
the field is being edited.
The use of the two properties allows one to cancel an edit, ir
to save it.
> Is this some peculiarity of Access VBA?
>
Probably, as it's only necessary when editing a bound control.
--
Bob Quintal
PA is y I've altered my email address.
.
- Follow-Ups:
- Re: Strange report error message - control must have focus
- From: Stephen Poley
- Re: Strange report error message - control must have focus
- From: Smartin
- Re: Strange report error message - control must have focus
- References:
- Strange report error message - control must have focus
- From: Stephen Poley
- Re: Strange report error message - control must have focus
- From: Wayne Gillespie
- Strange report error message - control must have focus
- Prev by Date: How to show the System Name
- Next by Date: Re: How to show the System Name
- Previous by thread: Re: Strange report error message - control must have focus
- Next by thread: Re: Strange report error message - control must have focus
- Index(es):
Relevant Pages
|