Results 1 to 5 of 5
  1. #1
    BruceUK is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Sep 2011
    Posts
    48

    Strange behaviour in a multi-line text box

    Hi everyone,

    I'm running Access 2003 under Windows 7 Home Premium.

    I have a form with a multi-line text box control, for which the 'Enter Key Behaviour' property is set to "New Line In Field". In some circumstances, the 'Input Mask' property for this text box can be dynamically set to "Password" within the VBA code for the form module, so that the typed text is displayed as asterisks. (I know this sounds strange, but there is a reason for it!)

    In this case, when typing text into this text box, if the Enter key is pressed, the cursor goes to the start of the next line as expected. However, when the next character is typed, the cursor reverts back to the line above. It leaves a space (i.e. no asterisk is displayed) at the position where the Enter key was pressed, but then continues to place the typed text as a continuation of the same line.



    Can anyone explain why it behaves this way? Is there anything I can do in the VBA code for the form module to make the cursor remain on the next line when further text is typed after pressing the Enter key?

    Any suggestions gratefully received!

  2. #2
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    I was able to repro this in Access 2007. The breaks in the field that you are seeing are because the carriage return isn't a visible character i believe. seems like a bug. I may you could toggle the state of the fields password mask with the use of another control.

  3. #3
    BruceUK is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Sep 2011
    Posts
    48
    Hi, thanks for your response. I'm more concerned about the fact that the cursor jumps back to the first line when another character is typed, rather than staying on the new line.

  4. #4
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    After reviewing the documentation regarding input masks. I think this is an issue with the Input Mask options in use. I see no resolution to this issue while using an input mask. If you need the typed characters entered to maintain some sort of privacy, you could try encoding(not encrypting) the text as its being typed.

  5. #5
    BruceUK is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Sep 2011
    Posts
    48
    Quote Originally Posted by Perceptus View Post
    After reviewing the documentation regarding input masks. I think this is an issue with the Input Mask options in use. I see no resolution to this issue while using an input mask. If you need the typed characters entered to maintain some sort of privacy, you could try encoding(not encrypting) the text as its being typed.
    Thanks Perceptus. I might try that!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access 2013 FE and BE strange behaviour
    By LGrey in forum Access
    Replies: 4
    Last Post: 01-28-2014, 03:00 PM
  2. Strange behaviour of MS Access form
    By selvakumar.arc in forum Forms
    Replies: 2
    Last Post: 08-15-2013, 12:07 AM
  3. Replies: 5
    Last Post: 04-15-2013, 12:54 AM
  4. Strange TableDef behaviour
    By tym in forum Access
    Replies: 12
    Last Post: 11-24-2011, 03:16 AM
  5. Qurey on two ODBC Tables Strange behaviour
    By tingletangle in forum Queries
    Replies: 1
    Last Post: 01-14-2010, 03:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums