Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Overlaying data from one form to another

Status
Not open for further replies.

ws6an

Technical User
Feb 3, 2001
1
GB
I have created a form with two fields - ClassID and StudentID. I want to create an additional popup form based on a query whereby the user can enter the class name and th e popup form will display the corresponding ClassID if they do not know it. Having checked that the Class Name and ClassID are correct I then wish to be able for the user to click on a button and the ClassID from the popup form automatically gets inputted into the previous form with the ClassID and StudentID fields. I can't remember how to do this though. Any ideas??

Many thanks
 
You can certainly do it the way you describe, but I think you may want to consider the following. Its just asuggestion based on the description of your database.

Im assuming you have a table named Classes that contains the fields ClassID and ClassName.

Use a combo box.

You can use the combo box wizzard to create it. Base it on the Classes table.

The row source property of the combobox will look something like this after its created:

SELECT classes.classid, classes.classname FROM classes ORDER BY classes.classname;

I will assume that you want to store the class ID for the student in the table that underlies your form, so the combobox control source property will be the name of that table field. the wizzard will prompt you for that.

The user will then simply click on the combobox and a list will sropdown listing the class ID and Class Name. They simply pick from the list and the class id will be stored.

Hope this helps.
Dave
gallagherd@earthlink.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top