×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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

Input Mask & Cursor Placement for Data Entry

Input Mask & Cursor Placement for Data Entry

Input Mask & Cursor Placement for Data Entry

(OP)
Hi,
I am trying to create an input mask to facilitate data entry.  The field value begins with the literal "DID" and is immediately followed by manditory entry of 5 digits, then an optional decimal point, and lastly two more optional digits.  For example DID00001, DID00002, DID00005, DID00005.1, and so on.  Based upon the tutorials, I have came up the following mask:

  "DID"!#####C99

What I would like to have happen is that when a user tabs into the field, that the cursor is placed immediately after the literal text, but I have been unsuccessful so far.  I have tried moving the exclamation point to the very beginning of the mask string, as well as some other variations, to no avail.

I realize that I could change the field to a number and paste DID to the front, but I don't have any macro/vb skills, and also do not wish to incur a potential workload of having to update every form & relationship connected to it.

Any solutions, or am I trying to swim upstream?  Thanks
 

RE: Input Mask & Cursor Placement for Data Entry

try this in the on click event

CODE

Me.Text0.SelStart = 3

RE: Input Mask & Cursor Placement for Data Entry

(OP)
I opened the form in design view, opened the properties dialog box, selected the Event Tab and pasted the code to the On Click property.  After saving the change, I went back in Form view, I clicked on the field.  The following error message surfaced:

"Acquired Lands Files Scanning DB can't find the object 'ME'.  If 'ME' is a new macro or macro group, make sure you hve saved it and that you have typed it's name correctly."

Do I need to place this code into a macro first and then call the macro?
 

RE: Input Mask & Cursor Placement for Data Entry

   
Try to skip (eliminate) Me. and make sure Text0 is actually the name of your field (which is probably not Text0)

Have fun.

---- Andy

RE: Input Mask & Cursor Placement for Data Entry

what you did is paste it in the event tab
what  you have to do is in  the event tab click on the command button wit the 3 dots and the module will open and in the event

CODE

Private Sub Text0_Click()
End Sub


add

CODE

Private Sub Text0_Click()
Me.Text0.SelStart = 3

End Sub


 

RE: Input Mask & Cursor Placement for Data Entry

(OP)
Appreciate the clarification.  Opened the event builder window and added to code as instructed.  It is nice to see popup/assist boxes show up as this is an indicator to me that I am on the right path.  Added the code and tested; it runs (yea).

Thank you both for the assist,
Paula

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