Hi All,

I am using vs2005 with access database.
Developing a new application. I am the new one to the application development.
This is what my situation which takes my time towards searching a reference
but no where it is found:

There is 2 tables named tblbill(contains VendorID & TruckID) and
tblvendor(contains VendorID & VendorName)
Where my user wants to display the vendorname against what he selected the TruckID

I know how to catch the VendorID in selection of the TruckID
But doesn't know how to retrieve the Vendorname based on the vendorID.
Please show me a sample to solve this problem...

Kindly help me,
Thanks in advance....

Type this into google "Joining tables in a SQL query"

With the following data

    VendorID   VendorName
    1          Sam
    2          George
    3          Fred
    4          Orville

    VendorID   TruckID
    1          101
    2          143
    3          212
    4          971

The following query

    select tblvendor.VendorName,tblvendor.VendorID,tblbill.truckid
      from tblbill inner join tblvendor 
        on tblbill.VendorID = tblvendor.VendorID

produces the following output

        VendorName   VendorID   TruckID
        Sam          1          101
        George       2          143
        Fred         3          212
        Orville      4          971

Thank you so much for your kind help sir............