Re: Strange report error message - control must have focus



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.
.



Relevant Pages

  • Re: Survivor: A New Host
    ... >> when editing culls 4 insightful questions from the 100+ that were asked. ... audience was allowed to control the reunion show because the host couldn't ... odor...but I know which question Jeff is more likely to 'reward us' with. ... Jenna was in control. ...
    (alt.tv.survivor)
  • Re: Editing linked images
    ... I've never worked with Flash files (well, ... in a control on an Access form - I would expect that you could. ... But, never mind, i am thinking of using Flash instead (not for editing), ... Dim strReturn as String ...
    (microsoft.public.access.forms)
  • Re: Editing linked images
    ... The reason I want to do inline editing is because ... in a form to edit it. ... The double-click event of the image control simply calls ... Dim strReturn as String ...
    (microsoft.public.access.forms)
  • Re: annoying problem editing default values on new records
    ... I'm seeing rather annoying behaviour when editing data in a control ... on my form, the first control is bound to a date/ ... not just the character I intended to backspace over ... One possible workaround is to force the user to enter some other data ...
    (comp.databases.ms-access)
  • annoying problem editing default values on new records
    ... Access 2003, using a bound form. ... I'm seeing rather annoying behaviour when editing data in a control ... on my form, the first control is bound to a date/ ... One possible workaround is to force the user to enter some other data ...
    (comp.databases.ms-access)