Question Highlighting particular text from nearby field to the adjacent field

njsphd

New member
Local time
Tomorrow, 03:09
Joined
Nov 5, 2013
Messages
1
Hi,
I am having a database in access and i want to highlight particular text from nearby column to the next column. For example,
--GCCCAGGCCCAAGAATGTCGCCGT GGAGGACTGTCTGTACATCAACGTGTTCGTGCCACGGCCCAGGCCCAAGAATGTCGCCGTCATGCTGTGGATCTTCGGGGGTGGCTTCTGACAAGCTATTGTGTTCGAATACACTGATT
--CGAATGAACGCTGTCCCTTCCACTGCTG GCAACATGCTCCCAGCCTTCGACAATGGCCCTCAATTCGAGGACTGGTTTCAACGAATGAACGCTGTCCCTTCCACTGCTGGAACTTCCGACTCCTTGTTGCCTAGAATGTCGCCGTCATGC

The first column text it should take as query and then it should only search the adjacent cell and highlight that.

While searching in the internet i came across a code also, But i dont know whether i can use that code or not.

ALTER PROCEDURE [dbo].[Search]
(
@searchTerm nvarchar(100),
@style nvarchar(100) = 'font-weight:bold; background-color:yellow',
@maxLen INT = 100
)
AS
BEGIN
SELECT
Id,
Name,
dbo.HighLightSearch(Description, @searchTerm, @style, @maxLen) AS Extract
FROM Documents
WHERE FREETEXT (Description, @searchTerm);
END

Please help me. Any help in this is highly appreciated. Other than access option also welcome.
 
I think you need to explain what you want to happen and when and why.

I cannot recall seeing anything like this. Do you have a Pic of a sample, or better still a copy of a database that has this.

Have you done a Google search.?

Where did you get this code.

ALTER PROCEDURE [dbo].[Search]
(
@searchTerm nvarchar(100),
@style nvarchar(100) = 'font-weight:bold; background-color:yellow',
@maxLen INT = 100
)
 
Hi,
I am having a database in access and i want to highlight particular text from nearby column to the next column. For example,
--GCCCAGGCCCAAGAATGTCGCCGT GGAGGACTGTCTGTACATCAACGTGTTCGTGCCACGGCCCAGGCCCAAGAATGTCGCCGTCATGCTGTGGATCTTCGGGGGTGGCTTCTGACAAGCTATTGTGTTCGAATACACTGATT
--CGAATGAACGCTGTCCCTTCCACTGCTG GCAACATGCTCCCAGCCTTCGACAATGGCCCTCAATTCGAGGACTGGTTTCAACGAATGAACGCTGTCCCTTCCACTGCTGGAACTTCCGACTCCTTGTTGCCTAGAATGTCGCCGTCATGC

The first column text it should take as query and then it should only search the adjacent cell and highlight that.

While searching in the internet i came across a code also, But i dont know whether i can use that code or not.

ALTER PROCEDURE [dbo].[Search]
(
@searchTerm nvarchar(100),
@style nvarchar(100) = 'font-weight:bold; background-color:yellow',
@maxLen INT = 100
)
AS
BEGIN
SELECT
Id,
Name,
dbo.HighLightSearch(Description, @searchTerm, @style, @maxLen) AS Extract
FROM Documents
WHERE FREETEXT (Description, @searchTerm);
END

Please help me. Any help in this is highly appreciated. Other than access option also welcome.
Are you running the database on an SQL server, (ALTER PROCEDURE)?
In Ms-Access you can use the Instr function. The text format for the control must be "Rich Text" and the same for the field in the table.
You also need to insert/ use "HTML" content, (like <Strong>Some bold text </Strong> for bold text.)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom