Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2010
    Posts
    85
    Provided Answers: 2

    Question Answered: What is the best way to tackle this??

    Looking for some sage advice here.

    I have been asked by my users to create a method of automatically inserting often used text in to a memo field. Generally the often repeated text will be something like "Work carried out to ...." after which further specific information is entered. the aim is to simply reduce the amount of typing that needs to be done by being able to insert often used phrases.

    Currently what they do is have a store of often used phrases in a text document that they cut and paste as required.

    Ideally I would like the DB users to be able to create and edit their own phrase list in the DB and not rely on an external source.

    I toyed with the idea of creating an external text document. I would then create a command button that would fetch the contents of the text document and past it in to the memo field. But I feel there should be a more elegant approach.

    Then I thought that maybe using the right mouse button in the memo field to choose a phrase from a list of phrases and paste it in to the memo field, but I'm not sure I could code that

    In an ideal situation you could conceivably construct the entire contents of the memo field by simply pasting often used phrases in whatever order you require.

    Does anyone have any suggestion that I might try before I plunge headlong in to the project?

    Thanks in advance.

  2. Best Answer
    Posted by Missinglinq

    "Here's some boilerplate code that does the kind of thing healdem suggested:

    Code:
    Private Sub YourComboBoxName_AfterUpdate()
     If Nz(Me.MemoBox,"") = "" Then
       Me.MemoBox = Me.YourComboBoxName
     Else
       Me.MemoBox = Me.MemoBox & " " & Me.YourComboBoxName
      End If
     End Sub


    Linq ;0)>"


  3. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    One way woud be to store those phrases in a table either as
    Key : Phrase
    Or
    Key : Brief description : Phrase

    Use a combo or list box to select the phrase and then in the combo / list box on click event add the phrase to the end of the current comnent
    I'd rather be riding on the Tiger 800 or the Norton

  4. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Here's some boilerplate code that does the kind of thing healdem suggested:

    Code:
    Private Sub YourComboBoxName_AfterUpdate()
     If Nz(Me.MemoBox,"") = "" Then
       Me.MemoBox = Me.YourComboBoxName
     Else
       Me.MemoBox = Me.MemoBox & " " & Me.YourComboBoxName
      End If
     End Sub


    Linq ;0)>
    Hope this helps!

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

    All posts/responses based on Access 2003/2007

  5. #4
    Join Date
    Sep 2010
    Posts
    85
    Provided Answers: 2
    Hello Missinglinq.
    Thank you very much. This is great.
    I really appreciate the effort of Healdem and yourself.

  6. #5
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Glad we could help!

    Good luck with your project!

    Linq ;0)>
    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
  •