Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
SelStart SelLength
Scott Adkins 

14 years ago
Your sugggestion works great in a stand-alone sub. I also put it in a button, and it worked there too. I found
on the internet [Field].SelStart=[Field].SelLength and that works in a button and stand-alone code too. But, putting those commands
into the body of a subroutine does not work either the way you suggested or what is above.

I am not sure if it is because it is on the after update that it does this, so let me explain program flow.
This notes field, has a 60 char limit. It is arbitrary, not on the field. I did this by counting char OnChange. Once the char count reaches 60,
it looks for the next time the user hits the spacebar (I did this because I will chop off the last word and start it on a new note.) This way, end users
do not have to worry about counting the length to say what they want. So it loops through the string from right, finds the first space and chops that
portion off. It then puts the chopped portion in the notes field. and cursor is there, ready for more typing,

So trying to find where the cursor went/when, I tried stepping through the code which was basically useless, because the cursor did not
show up when stepping through the code. I put time delay using DoWhile loop, and found that when the code (after Update) is at the end sub,
the cursor automatically goes to position 1. I did try to exit sub after the cursor is placed, and it makes no difference. Any thoughts?


Reply from Richard Rost:

I can't think of anything off the top of my head. I'd have to see your database and play with it to tell you for sure. I try to AVOID playing with keyboard input like this because it is quite troublesome. What is the end-result you're trying to accomplish?

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/16/2026 6:47:09 PM. PLT: 1s