473,322 Members | 1,718 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,322 software developers and data experts.

find method

lee123
556 512MB
Does anybody know what is the syntax for the "Find" method

lee123
Dec 7 '07 #1
4 2251
Killer42
8,435 Expert 8TB
Does anybody know what is the syntax for the "Find" method
The Find method of what object? In what version of VB?
Dec 10 '07 #2
lee123
556 512MB
I'm sorry I'm using vb6 and i want to find a customerID in a datagrid and i'm using a (adodc) I guess you can't use the data control in vb6 i tried but it says to use another control like (adodc) and I'm using access 2000 and i guess the data control don't like that either.


lee123
Dec 10 '07 #3
jaz215
55
I'm sorry I'm using vb6 and i want to find a customerID in a datagrid and i'm using a (adodc) I guess you can't use the data control in vb6 i tried but it says to use another control like (adodc) and I'm using access 2000 and i guess the data control don't like that either.


lee123
maybe that's because in the data control there is no find but a findfirst or a findlast. in a data control your code would look like this..
the txtInputID.text here is the id number of the customer you wish to search for. just tinker with the codes :P

Expand|Select|Wrap|Line Numbers
  1. strFind = Trim(txtInputID.Text) & "*"
  2.             strFind = "[CustomerID] like '" & strFind & "'"
  3.             daoCustomer.Recordset.MoveFirst
  4.             daoCustomer.Recordset.FindFirst strFind
  5.  
  6.             If daoCustomer.Recordset.NoMatch Then
  7.                 'record not found
  8.            Else
  9.                 'record found
  10.             End if
if using a adodc your code should be like this:

Expand|Select|Wrap|Line Numbers
  1. adoCustomer.Recordset.MoveFirst
  2.  
  3. adoCustomer.Recordset.Find "CustomerID='" & txtInputID.Text & "'"
  4.  
  5. If adoCustomer.Recordset.NoMatch Then
  6.  
  7.    'No Matching Record Found
  8.  
  9. Else
  10.  
  11.    'match found
  12. End If
Dec 10 '07 #4
Killer42
8,435 Expert 8TB
So, has this been any help?
Dec 12 '07 #5

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

Similar topics

10
by: Sacha Korell | last post by:
I'm trying to load a drop-down list with all DropDownList control names from another page. How would I be able to find those DropDownList controls? The FindControl method will only find a...
12
by: Rubbrecht Philippe | last post by:
Hi there, According to documentation I read the ArrayList.IndexOf method uses the Object.Equals method to loop through the items in its list and locate the first index of an item that returns...
5
by: Mike Labosh | last post by:
In VB 6, the Form_QueryUnload event had an UnloadMode parameter that let me find out *why* a form is unloading, and then conditionally cancel the event. In VB.NET, the Closing event passes a...
4
by: John Wolff | last post by:
Pardon me for such a newbie question. I've only been using C# for 14 months, and most of the stuff has been relatively basic. I have a serializable "Contact" class that has a number of...
5
gekko3558
by: gekko3558 | last post by:
I am writing a simple binary search tree (nodes are int nodes) with a BSTNode class and a BST class. I have followed the instructions from my C++ book, and now I am trying to get a remove method...
9
by: Kernel Bling | last post by:
Hi Everyone, This Saturday the stage was set. The problem simply could not go on existing -- it had to be solved. Many hours, articles, compilations and frustrations later I still did not find...
2
by: karinmorena | last post by:
I'm having 4 errors, I'm very new at this and I would appreciate your input. The error I get is: Week5MortgageGUI.java:151:cannot find symbol symbol: method allInterest(double,double,double)...
3
by: allendowney | last post by:
Hi All. In a complex inheritance hierarchy, it is sometimes difficult to find where a method is defined. I thought it might be possible to get this info from the method object itself, but it...
10
by: CodeNoob | last post by:
please help been working on a project got it down to 5 errors from 100 now i have no idea what to do. Errors: init: deps-jar: Created dir: C:\Users\Tommy\Desktop\build\classes Compiling 306...
3
by: raylopez99 | last post by:
I suspect the answer to this question is that it's impossible, but how do I make the below code work, at the point where it breaks (marked below). See error CS0411 This is the complete code. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
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.