Listbox in continuous subform

L

la

Hello!

I have a main form which display a single company, which contains a
continuous subform with the company's contact names. I would like to have a
listbox with the specific tel, email, etc. for each of the separate contact
names displayed as a control as part of the detail on the continous form.

Is this possible? Now the addition of the list box displays *all* the tel,
email, etc. for the entire table ContactDetail table.

Main Form: CompanyID (primarykey), CompanyName, etc.
SubForm: ContactID (primarykey), CompanyID (foreignkey), FirstName, etc
ListBox: ContactDetailID (primarykey), ContactID (foreignkey)

Many thanks in advance for your help.
 
R

roger

No.

You can't. But you can do something that looks like that.

1st realize that despite it being shown many times in the continueous form,
there is really only "one" listbox, so the source of that listbox must be
same on every row (although the *value* might be different)

Are you sure you want a listbox at all? (might you mean a combobox?)
if you want a visual list in a box, you can just use several fields stacked
tightly together, you can even draw a box around them.

if you want the effect of a combobox (i.e. a list that pops up when click a
little button) you can do that by making a little button and having a
seperate little form popup right under which ever button the user clicks.
Steven Lebans has code for that (www.labans.com)

but no, I don't think you can have *listbox* control display seperate lists
on separate rows of any continuous form (subform or not)

hth
 
L

la

Ah, thank you. That makes it clearer.

But then what would be the best way to display the company information,
which also displays the company's multiple contacts, and in addition to
displaying the contacts multiple telephone, email, and etc. contact
information all on one editable form?

Thanks.
 
N

nomadk

I suggest using two synchronized subforms. The top subform lists all of the
companies. Clicking on a record in the top subform displays that company's
contacts in the lower subform.
 
N

nomadk

Correction:

I meant, of course, that the two subforms are based on the list of contacts,
not companies.
 

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