Overtype a data field

  • Thread starter Thread starter Mick Horan
  • Start date Start date
M

Mick Horan

Hi,



I have a form that has a number of fields that I use to input data, these
fields are all numeric. I use a Temporary table to hold this data and then
append it to the correct table using an append query. It all works fine
except I have a small problem.



When the form comes up and I enter my data there is already a Zero in each
field and if I don't watch what I am doing as I enter a number, for example
"12" and tab to the next field the previous field will contain "120". If I
enter "7" it will be "70". This is frustrating cause I then have to go back
and delete the Zero.



Is there some way or a property that I can set that will automatically over
type this Zero?



Thanks for the help, Mick
 
Mick Horan said:
Hi,

I have a form that has a number of fields that I use to input data,
these fields are all numeric. I use a Temporary table to hold this
data and then append it to the correct table using an append query.
It all works fine except I have a small problem.

When the form comes up and I enter my data there is already a Zero in
each field and if I don't watch what I am doing as I enter a number,
for example "12" and tab to the next field the previous field will
contain "120". If I enter "7" it will be "70". This is frustrating
cause I then have to go back and delete the Zero.

Is there some way or a property that I can set that will
automatically over type this Zero?

Thanks for the help, Mick

First, I'd assume that the zeros in those fields are there because the
table design specifies a default value of zero for each of the fields.
You could just clear the Default Value property for each field, in table
design view, and you wouldn't have the zeros pre-entered in the fields
in the first place.

Second, if you want to leave the default values, but make sure that the
zero is automatically overtyped, you could change the "Behavior Entering
Field" option in the Tools --> Options... dialog (Keyboard tab) to
"Select entire field". I'm guessing it's currently set to "Go ot start
of field". Now, I'm not sure at the moment if this option affects just
the current database, or if it is an application option that will affect
all forms in all databases you open. If the option doesn't do what you
want, you can write a function that selects the entire contents of the
currently active control, and then set the On Enter event properties for
all these text boxes to call that function. That way you could control
which forms and fields behave this way.
 
Back
Top