473,399 Members | 4,254 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,399 software developers and data experts.

I am building a search form

I am new to access.
Please help me...

I am using access 2000. I have an access form that is bound to the table employees. The employee table has fileds for lastname, firstname, age, etc.

I want to build a search function on the form. I added a text box and a search button. When the user enters the last name(or part of the last name) in the text box and clicks the search button, I want to display all matching records(many employees have the same last name)..in a list box.

The user can select the emplyee and that record is loaded on the form.

Can someone help me with this?

Please include all code as I am new to access.

Thanks in advance.
Mar 8 '08 #1
4 1316
puppydogbuddy
1,923 Expert 1GB
Here is a link to a "How To" that includes a downloadable demo with the source code.

http://www.databasedev.co.uk/list_box_searching.html
Mar 8 '08 #2
lee123
556 512MB
Or you could do this to find a certain name:

Expand|Select|Wrap|Line Numbers
  1. private Sub Text1_Afterupdate()
  2.  
  3.      Dim search As String
  4.      Search = Text1
  5.      If search = "" or IsNull(search) Then Exit Sub
  6.      Docmd.GoToControl "What Ever your Field Is"
  7.      DoCmd. FindRecord Search, Acanywhere, False, Acsearchall, , accurrent, True
  8.      Me.Refresh
  9.  
  10. End Sub
lee123
Mar 8 '08 #3
Scott Price
1,384 Expert 1GB
Lee, thanks for your answer, but could I ask you to use the [code] tags provided?

As a full member, and especially with the number of posts that you have, this is not asking very much! It's quite simple to add them... Simply select your code in the reply window, then click on the # icon on the top of the reply window.

Thanks!

Regards,
Scott
Mar 8 '08 #4
lee123
556 512MB
yea sorry i always forget to do that when you see somrthing you can help with it just kida slips your mind sorry scott price

lee123
Mar 8 '08 #5

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

Similar topics

5
by: meckhert | last post by:
I am currently building a sports web application and have run into a design question. In order to create a new coach record, there are two pieces of information that are needed: 1) username 2)...
2
by: Marc R. Bertrand | last post by:
Hello, Do some of you know some pretty good books or web tutorials on building databases, if any? By that I mean, when looking at a business, the sound way of choosing the proper fields and the...
1
by: N. Graves | last post by:
Hi, I want to have a Search Dialog box that has several text box and fields to build a search and display the results in a form. I can do everything that I need to if I us a report but I would...
8
by: Steph | last post by:
Hi. I'm very new to MS Access and have been presented with an Access database of contacts by my employer. I am trying to redesign the main form of the database so that a button entitled...
1
by: jim Bob | last post by:
Again I'm sure this question has been answered somewhere but no luck from the search results. If someone can point me in the right direction that would be cool. I'm trying to build a query where...
6
by: Bob Alston | last post by:
Looking for someone with experience building apps with multiple instances of forms open. I am building an app for a nonprofit organizations case workers. They provide services to the elderly. ...
2
by: Mark | last post by:
Hi All, I am creating a music database for a friend and have run into a problem. Within the ALBUM table, I wanted to store the ARTIST_ID rather than the ARTIST_NAME. To do this, I intended to have...
1
by: cdhaynes | last post by:
Hi, I am using unbound text boxes in the header of a form to allow the user to search on a number of fields. I am using VBA to build a query string based on these and it has been fine when comparing...
12
by: iahamed | last post by:
Hi Everyone, I got two parts of my advance search to work, I am running out of Logic to connect the third. My mind is in swing! Pleaseeeeeeeee Help me. I have 3 Fiels to search, the First two...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.