date autofill (1 Viewer)

abieyuwae

New member
Local time
Today, 14:32
Joined
Oct 20, 1999
Messages
6
hi,
please is there a way i can have an autofill in two fields that contains date of the month from jan-dec and also, a social security number.so that each time i type the first couple of numbers in the ss field, it auto fills for me.
and
for the date, i have to make entries for each working day of the month, is there a way to make this simplier by having an auto fill?
 

Travis

Registered User.
Local time
Today, 06:32
Joined
Dec 17, 1999
Messages
1,332
Make the Social Security Field a Combo Box with the Social Security Number being the Bound field and Set the AutoExpand property to true.

The Date will be a bit harder as you can set the datefields default to today by making the DefaultValue =Date()

On the KeyPress event of the field add this code:

Private Sub DateField_KeyPress(KeyAscii as intiger)
Select case KeyAscii
Case 45 'or the - (minus key)
me.[DateField]=dateadd("w",me.[DateField],-1)
Case 43 'or the + (Plus key)
me.[DateField]=dateadd("w",me.[DateField],1)
End Select

End Sub

By using this method you will start with today's date and you can use the - or + keys to change the date. You can also assign other keys to different intervals if you desire (check help on KeyPress Event)
 

Users who are viewing this thread

Top Bottom