How can I make only part of a field default. I want the area code in a phone number to default?
This isn't easily done in a Table - you can set the default to (say)
2080000000 but then you'll have to overtype the zeros, risking error.
In a Form you can set the Default to (say)
(208)
with an Input Mask of (000)000-0000
You can then put the following code in the GotFocus event of the
textbox:
Private Sub txtPhone_GotFocus()
Me!txtPhone.SelStart = 6
Me!txtPhone.SelLength = 8
End Sub
This will fill in the area code and leave the insertion point at the
next digit. You can back up and overtype the area code if need be.