Textbox question. Please Help!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a bound textbox whose source is a date field. What the user would
like to do is enter numbers and not enter the // e.g., just enter 120105
instead of 12/01/05... Is that possible?

I have another textbox that has issues whose control source is rqstNo.
rqstNo has an input mask as !0000;;. The user is not happy when the click on
this line because the cursor goes to where it was clicked i.e., the position
maybe at the end or in the in middle, instead of going to the beginning. How
ill I make this friendly so that when they click, the cursor goes to the
begining?
 
I don't believe it's possible to do that with a bound field, but you could
try using an unbound field and putting logic in its AfterUpdate event to
transform that string into a date and then update the date field. Not sure
it'll be possible for a datasheet view, but if it's a single form display,
you can put logic in the form's Current event to transfer the value from the
date field to the unbound text box.
 
Ok, I see, I thought it was something possible, what about the 2nd question
about
I have another textbox that has issues whose control source is rqstNo.
rqstNo has an input mask as !0000;;. The user is not happy when the click
on this line because the cursor goes to where it was clicked i.e., the
position
maybe at the end or in the in middle, instead of going to the beginning. How
ill I make this friendly so that when they click, the cursor goes to the
begining?
is it the same thing too?
 
If you set your InputMask to something like this:
00/00/00;;_
Your user can type in 6 digits, which will be correctly interpreted.

As for your second question, you can add code in the textbox's OnEnter event
procedure like this: (assuming the textbox is named MyTextbox - otherwise,
substitute your textbox's name.)
MyTextbox.SelStart=0
MyTextbox.SelLength=0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top