automatically filling values in a field

dfuas

Registered User.
Local time
Today, 15:28
Joined
Jan 4, 2006
Messages
66
Hi eveybody,

I have 10 fields in a form where I put in years.
is it possible that if the first year is filled in as 2006 (for
example) that the next nine years fill up automatically as 2007, 2008, ......etc.

How would I do it?

Thanks

dfuas
 
Assume controls are named Y1 - Yn
In the lost focus event (or what ever event you decide) of you first box (where they are inputing) basically set an event procedure that populates the rest.

Me.Y2 = Me.Y1 + 1
Me.Y3 = Me.Y1 + 2
Me.Y4 = Me.Y1 + 3

etc.

As one way
 
I have tried that, but it does not seem to work.

Thank you

dfuas
 
Which event is the code in?
 
Ok it works but only after I click on the subsequent controls, but not when I select the data in the first control.
Thanks
dfuas
 
Loft focus event of which control?
In the lost foxus event of the control you keyin the base number, you should have > all < the code
 
It works fine now. thanks a lot FoFa

dfuas
 

Users who are viewing this thread

Back
Top Bottom