473,431 Members | 1,661 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,431 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 1976
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

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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.