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

finding a row in access database

1
Please sir
I have an access database from which I would like to find automaticaly an existing a part of a row. For example if my database stores customers informations such as name, surname, address, phone and i want to find inside this dbase a customer that name is for example "Borris" I should have :
- A form of screen where the user would enter the part of the row ej : "Borris"
- A button find to launch the recherch
That is my problem
Yvan
Sep 2 '06 #1
1 1459
MMcCarthy
14,534 Expert Mod 8TB
Create a blank form and put a textbox on it. Lets call it txtLastName (if you need to search the first name as well, I would create a second version of this).

Put a command button on the form called cmdSearch labeled appropriately and in the on click event of the button put the following:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdSearch_Click()
  2. On Error GoTo Err_cmdSearch_Click
  3. Dim stDocName As String
  4. Dim stLinkCriteria As String
  5.     stDocName = "RecordForm"
  6.     stLinkCriteria = "[LastName]=" & "'*" & Me![txtLastName] & "*'"
  7.  
  8.     DoCmd.OpenForm stDocName, , , stLinkCriteria
  9. Exit_cmdSearch_Click:
  10. Exit Sub
  11. Err_cmdSearch_Click:
  12.         MsgBox Err.Description, , "Error in Finding this record"
  13.         Resume Exit_cmdSearch_Click
  14.     Resume 0    '.FOR TROUBLESHOOTING
  15. End Sub
  16.  

Please sir
I have an access database from which I would like to find automaticaly an existing a part of a row. For example if my database stores customers informations such as name, surname, address, phone and i want to find inside this dbase a customer that name is for example "Borris" I should have :
- A form of screen where the user would enter the part of the row ej : "Borris"
- A button find to launch the recherch
That is my problem
Yvan
Sep 2 '06 #2

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

Similar topics

11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
2
by: Internet Arrow Limited | last post by:
Hi, I have a requirement to write an access application that must run under access97 and access2K. Some users will use Acess2K to access data that will also be accessed by Access97 users. The...
9
by: Lauren Wilson | last post by:
Hi Folks, We've been using Crypto ++32 to control licensed access to our widely distributed Access 2K app. Unfortunately, Sampson Multimedia appears to be out of business. Does anyone out...
4
by: David White | last post by:
Hello - I have already developed a database that can identify the workstation ID of users logged into a specific database. I would additionally like to know the workstation users NTID (login...
2
by: User 2084 | last post by:
Hello all. I'm an access newbie trying to learn how to do basic database data manipulations. I had a hard time searching the archives on this question as I don't really know what I'm looking for in...
1
by: leavandor | last post by:
Hello all, I've come upon a problem when trying to find where some data in my .mdb file is coming from. This database was designed by someone else several years ago, and now I've been put to...
2
by: DBQueen | last post by:
I received a "Could Not Find Installable ISAM" error (#3170) when using Docmd.TransferDatabase to export a table from one database to another - Set wrkDefault = DBEngine.Workspaces(0)...
10
by: Dixie | last post by:
I need to delete some relationships in code. How do I know what the names of those relationships are?
4
by: Jake Peters | last post by:
I'd like to know how to get a users various table privilages from a sql server (insert/delete/update), so that i can set controls to behave accordingly (read only, hidden, disable "insert" button,...
3
by: cemmons41 | last post by:
We recently converted from windows 2000 server to window 2003 server. The access database worked fine on the 2000 server. But now on the 2003 server searches are slower and sometimes search does not...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
1
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.