SQL on multiply fields in table

Hi I would like to know how I can search 2 fields of a

table using one text string. textbox is txtsearch.text

fields in database are name and alternate


I want VB to search both fields for the string contained

in the textbox and then set the data controls

recordsource to that field.


Please help I dont know how


Also is it possible to determine duplicate records. I

have entries in names that are duplicated in alternate

as this is a chemical database these names represent

duplicate records. Can i determine what records are duplicate by

seeing if names has an entry = alternate.


Please help as this is my final year project and I am

Stuck


Thanx







Comments

  • Actually your question is not very clear , please ellaborate, besides what I got is that you want to search a string in two fields of the same table, if that is so the query is simple


    E.g Table Name = Compounds

    string = Carbon

    Field1 = Organic

    Field2 = InOrganic


    Select * from compound where Organic = 'Carbon' or InOrganic = 'Carbon'


    could not understand the second question please explain


    : Hi I would like to know how I can search 2 fields of a

    : table using one text string. textbox is txtsearch.text

    : fields in database are name and alternate


    : I want VB to search both fields for the string contained

    : in the textbox and then set the data controls

    : recordsource to that field.


    : Please help I dont know how


    : Also is it possible to determine duplicate records. I

    : have entries in names that are duplicated in alternate

    : as this is a chemical database these names represent

    : duplicate records. Can i determine what records are duplicate by

    : seeing if names has an entry = alternate.


    : Please help as this is my final year project and I am

    : Stuck


    : Thanx







Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories