January 1st, 2000, 03:31 PM
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.
SparowHawk
January 2nd, 2000, 05:31 AM
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 ...