Query to return value to form

jothish_r

New member
Local time
Today, 03:00
Joined
Aug 11, 2003
Messages
5
i need help on...

i want to enter a ID and fetch the corresponding name from the database to the form..

i am able to execute but how do i put the value in another text box

thnx in advance
jo
 
Before I give a solution, what is the reason for bringing the name onto the form. Are you using the ID box as a search facility to find a particular record? (Im just making sure that you are not duplicating data unneccessarily)
 
yes i am using id for searching

so if i enter the id then i get the selected record.....

thanx
 
You can do this a couple of ways.
One is to add criteria to the underlying recordset and on the AfterUpdate event of the textbox and requery the form, limiting the recordset to one record

Another is to use a VBA recordset to find the appropriate record and display that.

If you use the search facility here, you will find a lot of answers and even Db samples of search facilities within a Db. If you cannot find what you need, get back.
 

Users who are viewing this thread

Back
Top Bottom