Search Results Are Highlighted Within The Text Box? How ? Access 2013
Hi Every one ,
Below I am describing some coding issue in VBA-MS Access I am facing right now , and I hope u guys could help me resolve the issues :
DB : MS access 2013 - RichTextBox In A Form -
Language : VBA
Problem In short : struggling to highlighting user search word within the search result query ..
What I want :
Helping to fix the second code shown below , the one I used to highlight ( reformat ) the text who's bound to a a field that store memo data type . code
My Result Search Query VBA COde ( Work perfectly )
strWhereToSearch = IIf(.framSearchIn.Value = 1, "[quknotSubject]", "[quknotBody] ")
strCondition = strWhereToSearch & " Like '* " & strTextSearch & " *' OR " & _
strWhereToSearch & " Like '" & strTextSearch & " *' OR " & _
strWhereToSearch & "Like '* " & strTextSearch & "'"
strSql = " Select * from qryExtraTool_QuickNoteSubCatMainCat "
strSql = strSql & " WHERE " & strCondition & " ORDER BY quknotDate"
The code that i am struggling to make it work for me to highlight the search word inside the textbox called .txtQuickNoteBody :
'Control Source for the text box to display matches.
Const strcTagStart = "<font color=""""red"""">"
Const strcTagEnd = "</font>"
strControlSource = "=IIf(" & strField & " Is Null, Null, " & _
"Replace(" & strField & ", """ & strSearchValue & """, """ & _
strcTagStart & strSearchValue & strcTagEnd & """))
.txtQuickNoteBody.ControlSource = strControlSource
Thank u all in advance .
Thank u so Bruce , I finally found an answer to my question.
The solution u provided looks complete except that i am confused by the meaning of strField , may i didnt provide more details in my post .
The strField var i provided earlier was not meant to be placed in my code , the correct one is shown below .However , the strField means according to me is the field against which the search operation should take place based on the ( search Term )
the user provided .
Here is the code after applying the solution u suggested :
'Information collected from the user
strWhereToSearch = IIf(.framSearchIn.Value = 1, "[quknotSubject]", "[quknotBody] ")
strCondition = strWhereToSearch & " Like '* " & strTextSearch & " *' OR " & _
strWhereToSearch & " Like '" & strTextSearch & " *' OR " & _
strWhereToSearch & "Like '* " & strTextSearch & "'"
'Fill result search Recordset
strSql = " Select * from qryExtraTool_QuickNoteSubCatMainCat "
strSql = strSql & " WHERE " & strCondition & " ORDER BY quknotDate"
'Control Source for the text box to display matches. ( Highlight the search word )
txtQuickNoteBody = SearchHilight(strWhereToSearch, strTextSearch)
Tell me if my implementation to your code is right ?
Thank u again Bruce ...
Similar Messages
-
HI
I am trying to fill out an application on Adobe Reader and some of the spaces are a bit short and do not allow me to competely answer the questions. Is there a way to either reduce font ot create 2 lines within the text box to allow for more space? I am using Adobe Reader 9.5.3 and MAC OS X 10.6.8. Any suggestions? Thanks.Run a script (either from folder-level or the console) that uses getField and then sets the desired property. Most properties are accessible if form rights are enabled.
Also, getNthFieldName and numFields are accessible in Reader, so you can easily list all of the fields in the file. -
when trying to change a search query in the text box how do i move the curser to the end of the query that is off screen.
androids default browser comes up with a little blue arrow that i can drag.
i should ssy this is only a problem when entering text in google search box for example and not in firefox search/address bar.We don't have a good way to do that yet. We just landed a thumb cursor on our nightly build. Which if all the tests pass it would show up on the Sept 14th [http://nightly.mozilla.org nightly].
-
Please someone has to know how to delate the text box and not the word or the page
HI
someone has to help i am trying to make a wedding invites on word but we dont want the text box how do you get rid off it with out dealeting the page.
What is a good progame to use to created wedding invites?Then you should probably post your question on the Microsoft Mac forums since it's their software you have questions about...
http://answers.microsoft.com/en-us/mac -
Windows 8.1 PC, using reader, when searching a folder containing approx 100 doc's. If i search for a word, no results are returned. only the doc names can be found but nothing from within the doc.
This is a new problem and was not the case before.Works perfectly fine for me with the latest Reader version (11.0.09).
You write that it worked "before"; before what? An update? Update from what version to what version? -
How do I change the number of columns within a text box? I need to go from 3 columns to 1. The insert column is highlighted and column break does not work for this.
Pages '09 does not seem to allow layout breaks in Textboxes.
Pages 5.2 has the same limitation.
Use multiple linked Textboxes in Pages '09 to get the layout you want or create your layout in a Word Processing template in the document layer.
Peter -
Safari Problem: After doing a search using all three of the search engines the search results are grayed out not allowing me to click on anything on the page. I also can't use the buttons to the left of the search box. Please help.
Go back to your home screen, then double click your home button to open your multi-task window hold your finger on the Safari icon until it start to wiggle and a red minus sign is in the upper left corner. Tap the red minus sign and completely close Safari, then reopen it.
-
When using the "Fill & Sign PDF" feature, is there a way to stretch to size the text box on a specific area of the page...instead of the text box going on in one straight long line....? I'm not seeing there's an option or ability to do so, just wanting to confirm.
Improving the handling of multiple line text fields is in our plans, but for now, you will have to add manual carriage returns (Enter).
Thanks,
Josh -
After placing a new text box in my document, typing new text, clicking away, then coming back to edit the text, I am unable to get my cursor to reappear within that text box. I can only select the box itself. I cannot select the text. Where is my cursor?
Even simpler than that.
Clicking once in a text box selects it.
Clicking once in a selected text box places the insertion point in the box.
The clicks do not need to be close enough in time to be read as a double click.
The same behaviour applies to table cells in Pages and in Numbers.
Regards,
Barry -
Why Are the Text Boxes I Create in a Layout Not Editable When I Add Them?
I've made some chapter and section layouts and in the layouts panel when I select them the text boxes are red and editable. But when I apply the layout to a page in my book, everything is greyed out. Nothing is locked, but now my layouts are useless.
Have anyone else had this issue? Am I just creating the text boxes incorrectly? What's the problem?I figured it out but this is a HUGE gotcha for anyone else this happens to.
While editing layouts, there is an option in the Layout Tab in the Inspector called "Editable on Pages Using This Layout". This MUST be checked for each object you want to change in the pages you add to a book. -
Search and Replace values in the text field before values are stored to DB
Hi,
In my application there is a question - text area and answer - text field. Problem is, some answers are stored with the single quotes to the DB and I have a problem while retrieving it from the DB. I need to replace the 1 single quotes with 2 single quotes. The values are stored to the DB when the submit button is clicked.
So I am using the following javascript code:
italics
<script type="text/javascript">
function test()
var str="&P2_S1.";
document.write(escape(str));
</script>
italics
I need to call this javascript function, when the submit button is clicked but BEFORE the values are stored to the DB. How can i get this done?
Please let me know.Hi,
Thanks for the reply.
Yeah I planned to drop the Javascript idea.
Now, I am using the PL/SQL code. This is what I am planning to do.
When the user enters any word like this, Test's, this single quote should be replaced by some special character, #@@#, - what is the PL/SQL code for this?
Right now my PL/SQL code is:
begin
update test set S1=:P2_S1 where name=:APP_USER;
end;
so the replacing part should come somewhere before the update statement.... how can I do it?
from the DB when the values are retrieved, I use the following code:
select REPLACE(s1,'''','') from test where NAME=:APP_USER; // this works fine.
Please help me with the replace of the single quote before the update process... -
Using Nightly 28.0a1, I'm having a problem with the text box fields when typing. I use Hacker's Keyboard which has onscreen arrow keys and I find it more convenient than fiddling with a tiny cursor thumb when editing text. On the Play Store Firefox it works just fine but on Nightly, any time I try to move the cursor with the arrow keys it jumps out of the text box and highlights other elements on the page. This is annoying beyond belief as it means having to resort to that imprecise thumb cursor that takes forever to get where you want it. Is this a known issue with the latest nightly builds?
Thanks for the report. I have filed bug https://bugzilla.mozilla.org/show_bug.cgi?id=939959. It would be helpful to know and if you can comment into the bug to indicate which input field you are testing on.
-
Is it possible to use a library color for text selected within a text box?
What I would like to do is be able to select a string of text within a text box and assign it a library color. Currently all you get is an audible "bong" if you highlight the text and try to select a color from the library. Likewise, if you select the text, then select the Character color palette, and then try to select the library color, it won't do it.
Attempted steps:
1. Select the text you would like to change the color for in a text box
2. Select the color in the Character window
3. Attempt to select the color from the library
I presume this simply hasn't been implemented yet but just want to make certain I am not missing something if there is a way to make this work the way that it seems it should.You can hold the left mouse button, click somewhere in your photo, drag the eyedropper over to the libraries panel, hover over the different swatches and you should see the colors change in the color picker.
When you find the color you want, release the mouse button. -
Varying number of columns within same text box
I am reposting this here as suggested. This has been submitted to the feature request. If you are also interested in this feature, please also submit it there.
here is original posting with replies:
http://www.adobeforums.com/webx?224@@[email protected]
One feature still missing (correct me if I am wrong) is to have number of columns applied to paragraphs not text boxes.
This is a constant hassal having to interupt the text box with a new text box and then another one after that just because you want a paragraph to be in muliple columns to save space for instance, or using some other work around like inline text boxes.
This is useful when trying to save space on a page, if you have short bullets, such as a list of items which if just left in a single column would leave a lot of white space to the right side of the column. Use this paragraph as an example. Pretend this is the lead in paragraph referring to the followng list. Include these items in your recycling:
-plastic bottles
-paper cups
-styrofoam
-tires
-fruit
-vegetables
-glass jars
-batteries
-cans
-drink boxes
-bones
-dairy products
-pet hair
-newspapers
-magazines
As you can see the list can get very long, and so breaking the list across a number of columns would really save space, as the bullets are just single words.
I have this situation everyday in the work I do and it is a real pain to have to redraw a new text box for each instance, and then another one to follow it.
And of course there is the whole headings that span multiple columns issue too.
I could forsee a feature where you would simply select the number of paragraphs and then change the number of columns. If it went to another page, then the number of comumns would still be applied as it is applied now to a text box.Thanks for your suggestions, Eugene. That's what users helping users is all
about!
However, we build the document (a book with hundreds of pages)
automatically, importing and autoflowing tagged text. Manual intervention
doesn't meet the need.
It's silly that a title or introduction should have to be in a different
frame from the rest of the text, just because the title/intro is
single-column and the text is multi-column. Ventura Publisher supported
paragraphs spanning columns 20 years ago. Adobe, get with the times!
Darrel Eppler
Global Publishing Services
SIL International
Eugene Tyson
<[email protected]
> To
DARREL EPPLER
05/21/2009 03:18 <[email protected]>
AM cc
Subject
Please respond to varying
clearspace-118700 number of columns within same text
4112-1NVP-2-8iM2@ box
mail.forums.adobe
.com
If you need to make it go from 1 column into multiple columns in a layout
then it stands to reason that you also need the content to remain in the
multiple columns.
There are various ways to do this.
1. Using Tables: You can have as many columns and rows as you like. The con
about this is that tables cannot break over pages, so you have to manually
split the cell so that the content fits.
2. Use Tabs: This can be awkward if your text is already in a list format,
it involves cut and paste and isn't "that" easy to implement. If the text
is already in a layout format that suits then putting in tabs would work
fine. The advantage is that this can break easily over pages/columns etc.
It's flexible to adjust the spacing etc. But it can be awkward to setup,
especially if there is a long list that needs to be in 2 or columns...
so then you have this option:
3. Use an anchored text frame: If you cut the content from your text frame
and paste it into a new text frame: Then anchor the new text frame into the
layout. You can specify the amount of columns in the anchored text frame.
The frame will move with the text, but just like tables, they won't split
over pages.
I've used all 3 on many occasions depending on what scenario came up -
different layouts need different workarounds.
But they shouldn't be work arounds, it should be just select this text and
put it into x amount of columns, and it should all flow without having to
do much else. -
In iWork Pages 5.1, how do I eliminate "text" in the Text Box?
In iWork Pages 5.1, how do I eliminate the word "text" which appears in the Text Box, when I've used a color filler and no words?
Select the text and delete.
If you don't want text in the box, don't use a text box ie in Shapes there are various shapes. Select one without 'T'.
Maybe you are looking for
-
How can I reduce the file size of a pdf when exporting?
I don't want to just choose between high quality print or smallest file size. I want to export it from 60MB to 40MB. Can I do this manually? When I use smallest file size the quality is too low and the content looks bad. But high quality print export
-
ICloud and Syncing Issues (Couldn't find in other threads)
I have been reading through a ton of threads asking similar questions, but have not found one exactly like mine so I am hoping for some insight here. First off we have an iMac, 2 macbooks, two iPhones, an iPod Touch, and several other iPods too. We h
-
Defining Logical System name for ALE using T.C- SPRO?
Hi, Can anybody tell, how to define logical system name using T.C SPRO? Where can I find the "Define Logical System for ALE"? Thanks Balaji
-
How to send an email to entire group
Hi, I have the same question that Ram asked back on 11/15 ...... Is there a mechanism I can use within Beehive to send an email to the entire group ? Thanks Bill RamRamanathan asked Hi, is there a way to email all group members in Beehive Online Gr
-
Please help!