Re: annoying problem editing default values on new records



On May 18, 3:52 am, "Fred Zuckerman" <Zuckerm...@xxxxxxxxxxxxx> wrote:
<helenwhee...@xxxxxxxxxxxx> wrote in message

news:1179294969.336303.249160@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





Access 2003, using a bound form.

I'm seeing rather annoying behaviour when editing data in a control
with a default value. It only happens when the form is on a new
record.

A specific example: on my form, the first control is bound to a date/
time field and has a default value of now(). When users need to change
this control's data, they'll most commonly need to alter the time part
leaving the date as is. But, on a new record, when the user highlights
the time part and presses delete, Access deletes the entire date and
time, not just the characters the user highlighted.

This behaviour isn't limited to date/time fields. If I set a default
value of, say, "blah-1" in a text field's control, then go to edit a
new record and attempt to change the control's contents from the
default "blah-1" to "blah-2" by backspacing over the 1, the entire
field is deleted, not just the character I intended to backspace over
(and yes I do make sure the entire field is not selected before
backspacing).

This only happens on a new record, and only when the user hasn't
entered any other data before attempting to alter the fields with a
default value set.

One possible workaround is to force the user to enter some other data
before editing the fields with default values, but that seems a bit
clunky, and on my particular form it's a lot more intuitive for the
user to enter the now() date/time field first.

Anyone else seen this weird editing behaviour with default values on
new records? Any good workarounds?

Helen,
It sounds like the user attempts to move to the end of the default value,
but in reality, the entire value is still hightlighted. I have used the
"SelStart" property with the "OnEnter" event to move the cursor to the end
of the current value of the field.


Nope, that's definitely not the problem. Only the selected characters
are highlighted, but when you hit the delete key, Access deletes the
control's entire contents. Thanks for replying though.

.



Relevant Pages

  • Re: 2nd Follow-up from Discworld newbie ...
    ... backspace, created by typing shift-6, shift-H. ... to the days of people using surplus teletypes as printing terminals, ... would honor control codes such as backspace, ... characters, and some of them only printed the control characters as ...
    (rec.arts.sf.written)
  • Re: 2nd Follow-up from Discworld newbie ...
    ... can't figure>> out how to do the clever backspace character show ... ... because CRT-based terminals were too expensive. ... the teletypes would honor control codes such as backspace, ... and overprinting characters, and some of them only printed the ...
    (rec.arts.sf.written)
  • Re: 2nd Follow-up from Discworld newbie ...
    ... out how to do the clever backspace character show ... ... to the days of people using surplus teletypes as printing terminals, ... would honor control codes such as backspace, ... characters, and some of them only printed the control characters as ...
    (rec.arts.sf.written)
  • Re: Backspace at TextBox.AppendText
    ... But when I keep hitting the backspace button, to the begining, where there ... are no more characters left, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: command line editing in cshell
    ... Kumaran Selvaratnam wrote: ... >I know how to do backspace with stty erase ^h ... >I want to know how to insert, add, delete characters in commandline... ...
    (comp.unix.shell)