Solved SelStart to textbox Time

silentwolf

Active member
Local time
Today, 15:48
Joined
Jun 12, 2009
Messages
644
Hi guys,
I got a textbox with formated time to enter Start time and Endtimes.

The input mask is __:__ on both textboxes

However is there a way of controling that the SelStart is always at the beginning of the textbox even when you click into the textbox?

I like that if the user clicks into the textbox to enter the Starttime he can straight away type the time rather then move the cursor to the front of the textbox.

Cheers

Albert
 
Did you look at the similar threads at the bottom of this page? Richard Horne says he "solved" a similar issue. Check it out-see if it works for you.
 
there are 2 Events you need to add code on the Textbox, Click and GotFocus:

Private Sub StartTime_GotFocus()
Me.StartTime.SelStart = 0
End Sub

Private Sub StartTime_Click()
Call StartTime_GotFocus
End Sub

Private Sub EndTime_GotFocus()
Me.EndTime.SelStart = 0
End Sub

Private Sub EndTime_Click()
Call EndTime_GotFocus
End Sub
 
Sorry did not see that other threads.

Thanks for pointing it out Anrelgp.
It works fine!



Cheers
 
Sorry did not see that other threads.

Thanks for pointing it out Anrelgp.
It works fine!



Cheers
No, you have to post before Similar threads appear. After all, until you post, there is nothing to compare against. :)
However the site does have a pretty good search facility.?
 
Sorry again I did some search online but found just SelStart and did not look in the forum to clearly.

I will do better next time!
 
Sorry again I did some search online but found just SelStart and did not look in the forum to clearly.

I will do better next time!
A lot of the time, Google will point right back here :) , but here is always a good place to start anyway.
 

Users who are viewing this thread

Back
Top Bottom