Results 1 to 1 of 1
  1. #1
    Join Date
    Sep 2003

    Unanswered: Searching in a memo field and copy value or use it as a new entry


    I am building a DB for linguistic project for my SO. (interpreter Dutch - Spannish)

    So for this project she needs to search an entire book for a certain spannish term and look up the dutch translation (which will not always be the same) The results will be further used for further linguistic analysys.

    I am trying to make it a little easier for her by automating some tasks.

    What i've already done:

    - Made a table with all paragraphs in memo fields.
    - Made a form (see attachement 1) where she has the Spannish paragraph, the corresponding Dutch paragraph and a subform where she can manually enter the exact spannish term, the dutch translation and the grammatical function and so on. The searched term can occur than once in one paragraph (in the example 4x)

    Now this is already good, no VBA used untill now but I think I can automate it even further by using some VBA.

    What I wish to achieve in that order and if possible:

    1. Instead of clicking in the field and CRTL-F search term, create a button which will search for term automatically. The basic form of the term is always the same but the full word can be different. Suppose I search for "some" but i would also need to have al the "somewhat"s and "something"s and so on. You get the idea.
    basicly the idea of the code would be:
    on press button()
    search memo field for word*

    or if possible:

    2. Instead of manually search with the button, let the form automatically highlite all the "some"s in the paragraph which will make it easyer to see them. Memo is not rich text for the moment.

    something like:
    for current memo
    1. search word*
    2. highlite word + suffix(*)
    3. if end string not reached go back to step 1.

    If highliting is not possible because of Access restrictions maybe placing the cursor in front of the (next) word or selecting (next) word would even be a good solution.

    and if possible:

    3. Whe selecting the translation (one or more words) from the paragraph add a button which will copy and entry this selection automatically in the right field in the subform.

    something like:
    on press button()
    copy selected text in memo to mystring;
    subform.translation.field = mystring;
    //insert value from mystring in the correspondig field in the subform

    Please just get me started. Any help welcome. Feel free to reply with ideas for any of the three questions.

    Thank you!
    Attached Thumbnails Attached Thumbnails 20130312 screenshot .PNG  

Tags for this Thread

Posting Permissions

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