Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert a time (with format "hh:mm") in the correct place

Status
Not open for further replies.

MARELI

Programmer
Jan 26, 2004
5
IL
Hello All!
i asked this inside other thread here without knoing if its correct or no so i m puting here as subject.
i need to insert a time (with format "hh:mm") in the correct place.

i have 9 fields like that format and i want, after inserting one value into it and GotFocus on the other, that the function take place and fill this control with a value that is not (equal+30 minutes) to any of other controls that ixisisting already in thos 9 controls.


thanks in advance

MARELI
 
Mareli,

Are you saying that you want the 9 controls to have 30 minute intervals based on what the first value is?

For example if the first value is 07:00 the other values would be as follows -

07:30
08:00
08:30
09:00
09:30
10:00
10:30
11:00
11:30


Steve
 
Hi steve!
Yes! Exectly!!
tHANK YOU AND
sorry not answering you immedidly!

MARELI
 
Mareli,

You will need to do a DateAdd something like this one in the AfterUpdate of the first date field that you set -

Private Sub StartInterval_AfterUpdate()
Interval1 = DateAdd("n", 30, Me.StartInterval)
Interval2 = DateAdd("n", 30, Me.Interval1)
End Sub

In my case I named the text boxes StartInterval for the first and then Interval1, etc.

HTH,

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top