Connecting Tech Pros Worldwide Forums | Help | Site Map

How Do I highlight a string and get the focus into a record on my form

Familiar Sight
 
Join Date: Apr 2007
Location: Lebanon
Posts: 211
#1: Aug 21 '07
Please help me

Using access 2003

I do have a form (continuous) that expand for me all products in a table name "[products]

I made a [textbox] in this form and it is unbounded

What i need is a botton that on click i want to find any part of the field where the [textbox]= [fieldname]---> get the focus on it and highlight it

I'm using this code that i found on this website

Application.Echo False
Me![fieldname].SetFocus
DoCmd.FindRecord textbox
Application.Echo True


this code works if the form is set to single form ..isn't wroking on the continuous form is there any other method??

JKing's Avatar
Moderator
 
Join Date: Jun 2007
Location: Niagara Falls, Ontario
Posts: 557
#2: Aug 23 '07

re: How Do I highlight a string and get the focus into a record on my form


Hi, I'm a little confused.

Do you want the user to be able type something into the textbox and find a match for any field on the form or a specific field?

Once found what exactly do you want done? Do you want the entire row selected? Or just have the record selector pointing to the record?
Familiar Sight
 
Join Date: Apr 2007
Location: Lebanon
Posts: 211
#3: Aug 23 '07

re: How Do I highlight a string and get the focus into a record on my form


Yes I want to highlight the string that i'm searching and has the focus on the record .... any idea about that ...


It is the same of the access search (using any part of the field)...

Am i able to see the code of the search that access use or there is another method...



thank you for ur reply ....
Reply


Similar Microsoft Access / VBA bytes