SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Jul 2000
    Location
    Walsall, West Midlands, United Kingdom
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SetText(\"dd/mm/yy\") in VB app not entered correctly

    Hi,


    I have a VB App and with three of the editboxes I am trying to set a date...

    I am using

    MyApp.ReleaseDate.SetText("20/06/01")

    (which is exactly how you would type it in, there is no input mask of any kind)

    However when this command executes, the editbox contains exactly the following, instead of the specified date:

    "?)^?)!


    In addition, prior to entering this data... the form is locked from editing... so I've got a function checking to see if the objects are locked, if they are then 'allow editing' is selected in the menu to allow editing and hence unlock the objects. I then check to ensure the objects are unlocked.

    The reason I've stated this,is because if you send the SetText, on it's own while the application is ready for editing (just for debugging purposes)... it works ok.

    Any ideas why this may happen?

    To get around it for the moment, I'm not entering a date and leaving these fields blank, but I would like to enter the dates anyway.

    Cheers,

    Beeblemaster.

    ------------------

    [This message has been edited by Beeblemaster (edited 06-28-2001).]

  2. #2
    Member
    Join Date
    Jun 2001
    Location
    Berkeley, CA, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SetText(\"dd/mm/yy\") in VB app not entered correctly

    It sort of looks like the Shift Key is being pressed somewhere:

    "?)^?)!
    '/06/01

    Don't know why your first number is appearing as a quote.

    ------------------

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Location
    Walsall, West Midlands, United Kingdom
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SetText(\"dd/mm/yy\") in VB app not entered correctly

    That's true, Bruce it does seem like the shift characters.

    On a UK keyboard shift+2 is a quote.

    but it means that the '0' in '20' is missing.

    Any idea why this might be happening... I assure you that shift is not being pressed or anything during the run???

    In fact no NumLock, CapsLock or ScrollLock is active and I'm using ST5.0.3.2 with NT4-SP6.

    Cheers.

    ------------------

  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SetText(\"dd/mm/yy\") in VB app not entered correctly

    You may have to use TypeKeys instead, we use custom methods here for some of our date controls. SetText does not agree with the TextField controls in our product.

    Use this winclass, and change your TextField to YourControlDateTextField and try it out.

    ------------------
    Steven C. Tyler
    Lead SQA Automation Engineer - Timekeeper Central group
    styler@kronos.com

    [This message has been edited by styler (edited 06-29-2001).]

    [This message has been edited by styler (edited 06-29-2001).]
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  5. #5
    Senior Member
    Join Date
    Jul 2000
    Location
    Walsall, West Midlands, United Kingdom
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SetText(\"dd/mm/yy\") in VB app not entered correctly

    Stephen,

    Thanks... that works a treat!!



    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:05 AM.

Copyright BetaSoft Inc.