Combo Boxes on form, Lookup tables help please

jenny23

Registered User.
Local time
Yesterday, 23:26
Joined
Apr 1, 2004
Messages
47
Hi friends,
Thanks for all your help so far. I appreciated that.
I have another question:
I created a table like this:
TableA
id student class
-- ------- ----
1 john his
2 ray eco
3 lisa his

TableB
StuName Address phone
-------- ------- -----
john 22 w st 202
ray 33 s st 703
lisa 2 south 202

TableA student fieldname type is lookup type that looks up TableB.

Then, I created a form on TableA that has all fields from TableA and TableB, I created a combo box for student fieldname and all fields from TableB. So, every time you click on student dropdown, then all fields from TableB pop up. However, when enter some data from table, it works just fine on the form. But when I enter new data from form, then close the form, the record is created correctly. But when I view from form, only StuName showed, the rest doesn't show.
I put this at RowSource for StuName:
SELECT tableA.StuName, tableA.Address, tableA.Phone FROM tableA;

for Address and Phone, I put like this on ControlSource: TableA.column(2), TableA.column(3)

Please help.

thanks.
Jenny.
 
1. The link between the two tables should be on StudentID rather than studentName.
2. Create a query that joins the two tables. Choose whatever fields you want from each table. Change the form so that all the controlsources are bound. Then when you choose the StudentID, the other fields will AUTOMATICALLY populate.
 

Users who are viewing this thread

Back
Top Bottom