CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    PLEASE Help I Must not understand!!!

    I want a form that allows the user to be able to put the id# of a record in 1 text box and have the rest of the record appear in the rest of the form text boxes. I would like to use either an excel table or a access data base. PLEASE Help.


  2. #2
    Join Date
    Jun 1999
    Posts
    32

    Re: PLEASE Help I Must not understand!!!

    I am assuming you are using DAO/ADO and not a datacontrol in which case you'll need some event to trigger the routine to open the database and display the record data if you use a text box to get the record ID - possibly a command button or even the lost focus event for the textbox though that would be somewhat messy I think. The following code should get you in the right direction though ...

    open database with whatever method you choose

    recordset.movefirst
    do until recordset("RecordID") = me.txtRecordID
    recordset.movenext
    loop

    now you are pointed at the record you want so put code to display the data here

    close database

    Hope that helps some ...


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

Featured