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

    Strange behaviour of a "memo" type text box

    Hello,

    I have a form containing a large text box that can accept an extended amount of text running to hundreds of characters. It is used as a typing exercise for trainee secretarial staff. The form is displayed repeatedly for a different displayed text to be entered each time.

    Normally there is no input mask for this text box. However, at randomly selected points, the text has to be entered without the trainee being able to see what is being entered, so the input mask is dynamically set to "PASSWORD" in VBA code. If the next entry reverts to "normal" input, the input mask is reset to "". The

    In testing this, I've discovered that, when the input mask is "PASSWORD", there is a maximum limit of 255 characters that can be entered. The problem I'm having is that, if the input mask has been reset to "" for a normal entry after the previous entry was masked, the text box is STILL accepting only 255 characters.



    The code I'm using is quite simple. Essentially it looks like this:

    If blnVBAMaskedInputRequiredForNext Entry Then
    Me.txtEnteredText.InputMask = "PASSWORD"
    Else
    Me.txtEnteredText.InputMask = ""
    End If

    Can anyone suggest what I can do to correct this problem? Any ideas would be much appreciated!

  2. #2
    warmslime is offline Advanced Beginner
    Windows 10 Access 2013
    Join Date
    Jan 2016
    Posts
    49
    I just tried it myself and I'm not seeing this behavior. I made a form with an unbound textbox and put two buttons, one that sets the input mask to password and one that sets it to "". It indeed doesn't let me enter more than 255 characters as a password, however when I switch to no input mask it lets me enter them just fine. In fact if I switch to password after having entered more than 255 characters and then switch back to no input mask, it saves the extra characters.
    I think the problem is in your table field properties. Mind attaching an empty copy of the database?

  3. #3
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    A quick fix to this would be to just format the text box as white text on white background when you want the user to enter text "blindly". That won't affect how many characters can be entered.

  4. #4
    BruceUK is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Sep 2011
    Posts
    48

    Thumbs up

    Quote Originally Posted by John_G View Post
    A quick fix to this would be to just format the text box as white text on white background when you want the user to enter text "blindly". That won't affect how many characters can be entered.
    That's a very neat solution - it works fine! A great example of "thinking out of the box".

    Many thanks John!

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

Similar Threads

  1. Strange behaviour in a multi-line text box
    By BruceUK in forum Programming
    Replies: 4
    Last Post: 08-28-2015, 02:27 AM
  2. Data type "memo" not available
    By msmithtlh in forum Database Design
    Replies: 1
    Last Post: 09-13-2014, 12:44 PM
  3. Unbound text box data type and "Delete" function
    By gaker10 in forum Programming
    Replies: 16
    Last Post: 06-13-2014, 10:46 AM
  4. Export "Query or Report" to a "Delimited Text File"
    By hawzmolly in forum Import/Export Data
    Replies: 3
    Last Post: 08-31-2012, 08:00 AM
  5. Replies: 0
    Last Post: 02-24-2009, 12:37 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