By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,773 Members | 2,583 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,773 IT Pros & Developers. It's quick & easy.

subform problem

P: n/a
I have a database with a main form which contains two subforms. The
main form holds data about name and address of a company. The first
subform holds tha contact data - name, position and DDI. The second
subform holds data on what activity has happened for that company with
fields for date, time, contact, action etc.

The contact field in the second subform does a lookup on the contacts
table, which holds the contact info for all companies. I would like
this to only show the contacts for that company and not all companies,
but can not work out how to do this.

Any suggestions????
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Simon Scott" wrote
I have a database with a main form
which contains two subforms. The
main form holds data about name and
address of a company. The first
subform holds tha contact data - name,
position and DDI. The second subform
holds data on what activity has happened
for that company with fields for date,
time, contact, action etc.

The contact field in the second subform
does a lookup on the contacts table,
which holds the contact info for all
companies. I would like this to only
show the contacts for that company
and not all companies, . . .


If you have a lookup field in the table, make it into a foreign key field,
removing the lookup property. If it is not a lookup field, just go on to the
next step. Create your own Combo Box that uses the Company ID in the main
form as a criteria in the Query you use for Row Source. You may be able to
do something similar without eliminating the lookup field, but see the
recent thread on lookup fields -- for tables used in forms and reports, they
are not a good idea because they obscure what is actually stored and,
judging from questions in the newsgroup, create more problems than they
solve.

Larry Linson
Microsoft Access MVP
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.