A Form for searching information

G

Guest

Sorry this may be a very stupid questions to all of you...

I have a form based on a single table (say, tblStudent) with a key field,
say, StudentID.

I want to design a form which on entering an ID into the StudentID control,
the remaining information from the tblStudent will be populated into a form
automatically. How can I do this? Do I need to use macros? Thanks for your
advice.
 
C

Carl Rapson

Fred said:
Sorry this may be a very stupid questions to all of you...

I have a form based on a single table (say, tblStudent) with a key field,
say, StudentID.

I want to design a form which on entering an ID into the StudentID
control,
the remaining information from the tblStudent will be populated into a
form
automatically. How can I do this? Do I need to use macros? Thanks for your
advice.

The simplest way would be to use Filter By Form. First create the form based
on tblStudent. Open the form, and then click on Filter By Form in the
toolbar. Enter the ID into the StudentID field, then click Apply Filter. The
associated record should then be displayed on the form. Be sure to remove
the filter when you're finished.

Carl Rapson
 
A

Albert D. Kallal

use the combo box wizard. It will build a combo box that does exactly as you
ask.....
 
G

Guest

If you set up a combo box for Student Id (based off the tblStudent) with all
of the fields needed in the combo box. The fields could have a width of zero
if you did not want them to show.

On the After Update event of the combo box put:

Address1 = Me.StudentID.Column(1)
Address1 = Me.StudentID.Column(2)
City = Me.StudentID.Column(3)
etc...

The column number starts with zero so column 1 in the example is actually
the 2nd column.

Hope this helps.
Jackie
 
G

Guest

Fred said:
Sorry this may be a very stupid questions to all of you...

I have a form based on a single table (say, tblStudent) with a key field,
say, StudentID.

I want to design a form which on entering an ID into the StudentID control,
the remaining information from the tblStudent will be populated into a form
automatically. How can I do this? Do I need to use macros? Thanks for your
advice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top