Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2006
    Posts
    60

    Unanswered: Changing "Undo" For Textbox

    I have a text field in my database which we put a lot of writing into for the main body of faxes. Problem is that as the users are typing in the box, and press ctrl+z to undo a change they just made, it turns the box to what it was before they started editing it. so when they write out most of there fax then hit undo to get rid of 1 sentence or something, the whole lot disappears. is there anyway to make it work just like it would in word etc?

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    The simplest suggestion would be to disable CTRL + Z functionality.

    I believe the way that this works is that when you write into a textbox - the value inside becomes "dirty" (seriously, that's the word for it) and ctrl + z simply "cleans" (removes the dirty string).
    George
    Home | Blog

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Actually it does work the same as in Word! Undo or <Ctrl> + <Z> takes you back to the last saved version, in either Word or Access. The only "changes" that it undoes in Word since the last save is formatting and cutting/pasting operations, etc.

    Think about it! You go into a textbox and add a line of text. You add a second line of text. You add a third line of text. You hit <Ctrl> + <Z>. How would Access know you only wanted to remove the last line of text you entered?
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Feb 2006
    Posts
    60
    Missingling: yer i understand that but the users dont.

    is there a way to implement a text editor into my forms? so they can write there stuff in it, then when they are done it copies all the text from it and into my database field?

  5. #5
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Not that I know of, but how would that change the problem? <Ctrl> + <Z> would still do the same thing in a word processor, delete everything entered since the last save.

    I've got a hack for a textbox popup that emulates a word processor. If you're still interested let me know. Is the textbox bound to a text field or a memo box?
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    And if a text field, what is the Field Size set to? Default = 50, maximum = 256.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    Join Date
    Feb 2006
    Posts
    60
    its a memo box. could you send that hack ovver anyway so i can fiddle. cheers

  8. #8
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Place a textbox on your form; name it PopUpBox
    Goto Properties > Format and set Visible to No

    Place a command button on your form; name it AddItButton
    Goto Properties > Format and set Visible to No

    The Memo field in this example is called Nnotes. Replace this in all code below with the actual name of your Memo Field control.

    When the user Double-Clicks on memo field, PopUpBox and AddItButton both become visible

    Code:
    Private Sub NNotes_DblClick(Cancel As Integer)
       PopUpBox.Visible = True
       PopUpBox.SetFocus
       AddItButton.Visible = True
    End Sub
    The user can then type his notes in, making edits until he has it exactly the way he wants it. Then clicking on the AddItButton adds the new text to the memo field and makes the PopUpBox and AddItButton vanish again!

    Code:
    Private Sub AddItButton_Click()
      If IsNull(Me.NNotes) Then
        Me.NNotes = Me.PopUpBox
      Else
        Me.NNotes = Me.NNotes & " " & Me.PopUpBox
      End If
      NNotes.SetFocus
      AddItButton.Visible = False
      PopUpBox.Visible = False
      PopUpBox = ""
    End Sub
    Good Luck!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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