Results 1 to 3 of 3

Thread: How to search through access database and display entire row in text boxes

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2008
    Posts
    2

    Question How to search through access database and display entire row in text boxes

    How can I search through an access database using
    SELECT*FROM [TableName] WHERE [FieldName] = textbox1.text
    Is there a way I can call the row number in order to return other fields from that row into textboxes? Any help would be greatly appreciated!

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: How to search through access database and display entire row in text boxes

    Welcome to VBForums

    How you do it depends on several things, most important of which is the language you are using.

    From your profile it seems that you are using VB2008, so I would recommend the "ADO.Net Tutorial" at the top of the VB.Net section of our Database Development FAQs/Tutorials (at the top of this forum)

    That covers most of what you need to know, and may be enough for you - if not, you will at least be able to ask for more specific help.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2008
    Posts
    2

    Unhappy Re: How to search through access database and display entire row in text boxes

    Well I am using VB2008 and I have most of what the tutorial says down but I don't know how to display the information i record in the DataSet using an ID.

    I am filling a DataSet with the information retrieved from this statement: SELECT * FROM [TABLE] WHERE [FIELD] = TEXTBOX1.TEXT

    I need it to return the row number that this information is found so that I can populate text boxes using this statement: Textbox2.text = ds2.tables("Workorders2").Rows(I need this number!!!!).Item(0)

    That way i can populate the textboxes with the rest of the information from that row.

    So to recap, I want to search using the WorkOrder number then retrieve the row in which the number is found so I can populate the rest of the textboxes using that row number. Hope it makes sense!!!!! and I realllly need help.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width