473,320 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to search a character or word by vba

Hi All,
Anyone can give me vba code for searching texts in ms access form or recordset. The purpose must be same as search column which is showing access form navigation bar. Becauase I need hide navigation bar and to use our own code.

Regards,
Sep 21 '12 #1
4 1769
Seth Schrock
2,965 Expert 2GB
A simple solution would be to but a button on the form and use the control wizard to make the button bring up the search form. In the Record Navigation category, select the Find Record Action. You can finish going through the wizard putting in your own choices. Clicking on this button will bring up the Find/Replace default window. This is the same window that would come up if you click Find in the ribbon bar in Access 2007/2010 or the Edit>Find in previous versions.
Sep 21 '12 #2
Hi Seth,
Thanks for your reply. Let me clear what i need actual. I have a bound form with many fileds (such as first name, last name, company, job)
I have two controls on this form. One is a unbound textfield named as txtSearch and another one is a command button named as btnSearch. When we are putting a word in the 'txtSearch' and pressing 'btnSearch', it has to search for the txtSearch value in first field of the first record. When we will make another press on btnSearch button without any changes in txtSearch field, this time it has go to next field of the same record. When all field will finish then it has to go to next record and has to repeat the same. This we can do with the search filed of navigation bar on a accfess form. The same I need in vba code without showing any dialog window such as find/replace.
Sep 21 '12 #3
Seth Schrock
2,965 Expert 2GB
How do you want to display the results? Are you looking for a complete list of records or do you just want it to stop at the first one it finds and if it isn't the one you wanted, you click search again and it finds the next?
Sep 21 '12 #4
zmbd
5,501 Expert Mod 4TB
Zalfa Arif,
Why do you need to replicate what is already available from the software?
What code have you tried so far? Please post it, remember to format your code using the <CODE/> format button.
Sep 21 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: kiani | last post by:
Hi, I am using fulltext searches and they are working fine. We have set ft_min_word_length to 3. However, some users need to search for two-letter words, and we are not sure if we should...
2
by: Eric | last post by:
How to i search the colon in the data and then pick characters after colon. for eg: ACTUAL DATA Date: Fri Aug 04 15:14:38 EDT 2006 REQURED DATA Fri Aug 04 15:14:38 EDT 2006 Thanks,
2
by: Eric | last post by:
How to i search the colon in the data and then pick characters after colon. for eg: ACTUAL DATA Date: Fri Aug 04 15:14:38 EDT 2006 REQURED DATA Fri Aug 04 15:14:38 EDT 2006 Thanks,
7
by: babysnoopy | last post by:
Im a beginner of C++. I want to solve this problem. I have to search few key words from few text files. How to create a file and do the operation as mentioned .
6
by: Orsa | last post by:
I'm an Italian student and I want to solve this problem. I have to search key words from a text files. How can I do the operation as mentioned?
2
by: Vinodhg | last post by:
Hello Sir/Madam, I am writing a perl script to find a word from a file.. #!/usr/local/bin/perl unless (open(VINODH, "vinodh.txt")) { die("Cannot open input file vinodh.txt") }...
0
by: aagarwal8 | last post by:
Hi, How can i search a particular word in webbrowser control in .Net? That is if the searched word is found, it should be highlighted like in internet explorer. Regards, Ankit!!
7
by: veer | last post by:
Hi! i am making a program in which i want to search a particular word in html file and if word found save it into excel file with html file name e.g i want to search a string "visual" in a.html...
1
by: Ragavendran | last post by:
Hi, I am using this method for search: Query =org.apache.lucene.queryParser.QueryParser.parse(String arg0) throws ParseException Hits = org.apache.lucene.search.Searcher.search(Query query,...
0
by: Fredrik Lundh | last post by:
dudeja.rajat@gmail.com wrote: I strongly doubt that this is the code you used. "*" means zero or more matches. all lines is a file contain zero or more # characters. but using a RE is...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.