VB for Search in Tables

jsurratt

New member
Local time
Yesterday, 16:46
Joined
Jan 15, 2008
Messages
4
I have a database that has infomation on people and their business. I work at a bank and this is for the officers to keep track of who they are calling, if they are customers or prospects. I want the officers to be able to search for the customer name, Business as well as there name. If you can just help me with the customer Name I can figure out how to do the rest.
My table is CustomerTable and I want to look for their LastName. I Would like a seperate Form to popup and all they have to do is enter the LastName and click ok and the form with the last name will popup.

I would really love yalls help.
 
Last edited:
Well if you are talking about the Find Record (Binoculars) I have tried that as well. It does not give me the information. It says there are not records found. And I know there is a record with the information that I have entered. I have even tried the filter and it filters out what I want but doesnt show the only thing I filter. It shows all the records but leaves the records that I filter blank.
 
I'm not talking about the binoculars. Did you follow the link?

I'm talking about using the Find Method in an ADO recordset. You can also just dynamically change the WHERE clause of the SQL statement to get specifically what you want.

What does your code look like? Can you post a snippet of it so we can see what's going on?
 
I think this should work.

Build a query, and add the table CustomerTable. Then add the field LastName, and put the following in the Criteria box - Like [LastName]

Then in Parameters put [LastName], and Text as the Data Type.

Hope this helps :)

- Jordan

EDIT - I just realised you said to use VB. If you have to then sorry for posting, and the guy above will know way more than I do. If you don't have to, then I think that my solution works very well, as it is very easy and quick to implement into your Database, as well as being easily editable
 
Last edited:
Yes I followed the link. I was a little confused on what to do with the code. I am not the good with VB code. I had code but got ride of it due to it not working and frustartion. So really I am starting over with no code to work with.
 
Well I have found out how to do it. I thank you both for your help. Jk45 gave me an idea and I ran with it and it works. So again I thank you both for your help.
 
No problem. Glad I could help :D.

- Jordan
 

Users who are viewing this thread

Back
Top Bottom