Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

I need a move cursor to

I need a move cursor to

I need a move cursor to

Dim Date1
Dim Date2

'other setup stuff

If Date1 < 01/01/1900 then
Date1 = "" ' erase date1
end if ' ok here
[cursor goes to date2]
(need a move cursor to start of date1)

RE: I need a move cursor to

SendKeys "{HOME}"

That will place the cursor at the beginning of the date1 Text Box. (But NOT the date1 variable)

RE: I need a move cursor to

Alt255 thanks your code works great! There is a problem with the dates (read, program design) in that they are built as maskedit_change and for each number in the date the program must exit and restart. Some other internal pointer moves to date2 if the entire date is entered.
how do I tweek that one. OR would CALL work. Thanks again

RE: I need a move cursor to

I'm not familiar with maskedit and I'm not sure what you mean about the CALL. Sorry. If you can access the change event you should be able to include your own validation rules. Can you offer some more information?

RE: I need a move cursor to

It seems Maskedit is not high on the list of everybodys favorite function. When I build a maskedit it all ways shows as Maskedit_Change (rather than a _Click that would allow the entry of a full date then start the edits) and
change causes a run thru of the entire function with EACH character entry and the checking for which passthru verses
when to start the edit check and other fun things. IF ANYONE KNOWS HOW TO GET A MASKEDIT_CLICK

RE: I need a move cursor to

We get a lot of queries about MaskEdit - seems that no-one likes it.

Another programmer who works for Cargill told me to try the DatePicker control. I haven't used this yet but the applications he writes seem ok.



Mike Lacey

RE: I need a move cursor to

Mike ,I found this in some veryold code
Private Sub Amount_Change()
Dim strvalid As String
strvalid = "0123456789."
If keyascii > 26 Then
If InStr(strvalid, Chr(keyascii)) = 0 Then
keyascii = 0
End If
End If
AccessKeys = vbKeyReturn
End Sub

Strangely, it works T.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close