Phone and area code field

morlan

Registered User.
Local time
Today, 14:55
Joined
Apr 23, 2003
Messages
143
I have two text boxes, one for the area code and another beside that for the phone number. When the area code field has the focus I want it to hop to the phone number field when I press space bar.
 
Hi there,

I've just tried out this piece of code in Access 2K

PHP:
Private Sub txtAreaCode_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeySpace Then
    txtNumber.SetFocus
End If

End Sub

Where I have txtAreaCode and txtNumber just substitute for the name of your controls.

HTH
Rob
 
Morlan,

Your profile doesn't give your location, but just as an aside (if you're in America or if anyone reading this is) for about $25 you can purchase, on-line, from several sources, an Access table with area codes, zip codes, cities/states and longitudes/latitudes. By having your users enter just the zip code you can automatically fill in the city, state and area code fields for the record. This saves a great deal of data input time for the user, and as well as guarantying the correct entry for city/state/area code.

The Missinglinq
 
missinglinq said:
Morlan,

Your profile doesn't give your location, but just as an aside (if you're in America or if anyone reading this is) for about $25 you can purchase, on-line, from several sources, an Access table with area codes, zip codes, cities/states and longitudes/latitudes. By having your users enter just the zip code you can automatically fill in the city, state and area code fields for the record. This saves a great deal of data input time for the user, and as well as guarantying the correct entry for city/state/area code.

The Missinglinq
Thanks mate.

I already have a postcode server set up. Thanks anyway!
 
Robert Dunstan said:
Hi there,

I've just tried out this piece of code in Access 2K

PHP:
Private Sub txtAreaCode_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeySpace Then
    txtNumber.SetFocus
End If

End Sub

Where I have txtAreaCode and txtNumber just substitute for the name of your controls.

HTH
Rob
Cheers I give that a try now :)
 

Users who are viewing this thread

Back
Top Bottom