Hi, every one.

Through the help of talented programmers and contributors, I have been able to get some were with the program design and coding process.

Thanks to you all.


I want help in resolving this problem, Pls.

I created a database with the following information, but I wanted using the Regno. Filed to search my database for equipment’s record.

Here are the details of my database.

Ms Access Database: Equipment
Table Name: Equipment Table
Table Field for searching: Regno (Data Type: Text) ( Do I Need To Change The Data Type? Pls Notify Me)
VB form name: frmEMReD
Project Name: Main Project
;;
I have linked all other textboxes to the database table in access, they are functional.
;;
Pls, I Will Be Grateful If My Request Is Given Urgent Attention

Thanks.

Hi, you can use SQL Statement to do a search. For example:

Select * from Equipment where RegNo like'*212*'

it will return all the data that have 212 in RegNo field.

Hope it help

Hi. there!!!

You have not mentioned which data control you are using. The following code works fine with ADODC. you will have to connect ADODC to your database through Control Panel -- > Administrative Tools --> ODBC Data Sources

If cmdFindRegNo.Caption = "F&ind Reg No." Then
    With Adodc1.Recordset
        .MoveFirst
        .Find "RegNo = " & Text22.Text
                       
        If .Fields("RegNo").Value <> Text22.Text Then
            MsgBox "Reg Number " & Text22.Text & " not found. Please enter a valid Reg Number.", vbInformation, "Enter Valid Reg Number"
            Text22.Text = ""
            Text22.SetFocus
            Exit Sub
        end sub

For any further queries, feel free to mail
[snipped]

Edited 5 Years Ago by Ezzaral: Snipped email. Please keep it on site.

Thanks, soo very much, for your attention, i will apply it and give result report.


i created a combo box and filled it with items. i created a text box as well that sould display cetain code depending on my choice on the combo box.

Pls, one samll how do i go about it.

clue: if i select from combo1 "Petrol" i want the text box to display "0001"

Hi. there!!!

You have not mentioned which data control you are using. The following code works fine with ADODC. you will have to connect ADODC to your database through Control Panel -- > Administrative Tools --> ODBC Data Sources

If cmdFindRegNo.Caption = "F&ind Reg No." Then
    With Adodc1.Recordset
        .MoveFirst
        .Find "RegNo = " & Text22.Text
                       
        If .Fields("RegNo").Value <> Text22.Text Then
            MsgBox "Reg Number " & Text22.Text & " not found. Please enter a valid Reg Number.", vbInformation, "Enter Valid Reg Number"
            Text22.Text = ""
            Text22.SetFocus
            Exit Sub
        end sub

For any further queries, feel free to mail
avirooge@yahoo.com

This article has been dead for over six months. Start a new discussion instead.