473,418 Members | 2,052 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,418 software developers and data experts.

Here is a simple search box

lee123
556 512MB
i have asked this before 'how to make a search box to find a customer without scrolling through the records!" now i have made one so i hope there are people out there who can use this.



Expand|Select|Wrap|Line Numbers
  1. Private Sub Text63_AfterUpdate()
  2.  
  3.      Dim mydata As String
  4.  
  5.      mydata = Text63  'WHAT YOU WANT TO USE EXAMPLE: TEXTBOX, INPUTBOX
  6.      If mydata = "" Or IsNull(mydata) Then Exit Sub
  7.      DoCmd.GoToControl "customername"  ' OR WHAT ARE YOU SEARCHING FOR
  8.      DoCmd.FindRecord mydata, acAnywhere, False, acSearchAll, , acCurrent, True
  9. End Sub
i used in this example a textbox but you can use a input box for this as well.
this searchbox example you just have to enter the first two or three letters of the customer and press enter.

this should be on your customer form.
by the way if you have account number to search for you can put that in the code as well just change the:

Expand|Select|Wrap|Line Numbers
  1. docmd.gotocontrol  "accountnumber"
or what ever you searching for.

please let me know how it works.

thanks lee123
Sep 5 '07 #1
1 1975
130975
18
Hi lee123,

Great Job. Its working perfectly. Looking for some more useful VBA coding.

Thanks and regards
130975
Sep 5 '07 #2

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

Similar topics

0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.