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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add a field in a subform??? 1

Status
Not open for further replies.

tigreeuropeo

IS-IT--Management
Oct 2, 2001
30
ES
Hi!!!
I have a form and a subform in it.
The form is to type in orders, and the subform the items of the order, it has unlimited number of lines.

I generated these forms using the wizard a long time ago, and it has a lot of code in it, so I can't start it again.

I would like to add another column from another table in the subform, especifically the name of the item, but I don't know how to do it.

Can you help me?.
Thanks
 
Apparently the record source for your subform is a table. To add a field from another table you need to change the record source to a query. Add the original table and the table with the field you want to see on the subform to the query. The form doesn't have to be changed at all; only the record source.

Uncle Jack
 

Thanks Uncle Jack.
I am trying to do that, but when I change the recordsource of the subform, everything that's contained in it disappears!!.
That's a tragedy for me...

Is there any way around not to loose everything I've done in it?. The general question might be: how can you change something you generated with the wizard without loosing anything?.

Thanks.
 
In the design of your subform, click to the right of the record source box to bring up the builder. Click Yes when askedif you want to open a query based on your table. Add the extra table, join on the item ID field, and drag the field you want to add onto the grid. Nothing that's already there should disappear.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top