Override fields

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

Is there any way to setup an event procedure for fields in
a form, to override existing data?
Thanks
Joe
 
Is there any way to setup an event procedure for fields in
a form, to override existing data?
Thanks
Joe

Yes.

For a more detailed answer, please ask a more detailed question!
 
By default, all fields are Add mode

I have a field with a phone number format, if I want to
change the last 4 digits; I have to highlight it and type
the new information. Is there any way to format the field
to edit mode, so when I type new information the old one
is automatically deleted.
Thanks again
Joe
 
By default, all fields are Add mode

I have a field with a phone number format, if I want to
change the last 4 digits; I have to highlight it and type
the new information. Is there any way to format the field
to edit mode, so when I type new information the old one
is automatically deleted.
Thanks again
Joe

I think you can do this by setting the SelStart and SelLength
properties of the textbox in the textbox's GotFocus event. For
instance, to automatically highlight just the last four digits (I too
live in a small town, and all phone numbers are (208) 722-xxxx) you
can use:

Private Sub txtPhone_GotFocus()
txtPhone.SelStart = 10
txtPhone.SelLength = 4
End Sub

Tweak these to match your phone format, input mask, and what part of
the number you want selected.
 
John,
Thanks

Actually your idea works fine if you always change the
same digits; however I don't know what I'll change.
The reason I mentioned a phone number format, because the
computer won't allow you too add a new digit until you
delete the old info, cause of the maximum digits.

Please help me
Thanks
 
Joe said:
By default, all fields are Add mode

I have a field with a phone number format, if I want to
change the last 4 digits; I have to highlight it and type
the new information. Is there any way to format the field
to edit mode, so when I type new information the old one
is automatically deleted.
Thanks again
Joe

Do your users appreciate that? What if one wants to change just one digit?
 
John,
Thanks

Actually your idea works fine if you always change the
same digits; however I don't know what I'll change.
The reason I mentioned a phone number format, because the
computer won't allow you too add a new digit until you
delete the old info, cause of the maximum digits.

You've lost me. Could you give me an example of what you want to
change? If you want Access to telepathically determine before you type
which character or characters you want to change, it's not going to
work...
 
Back
Top