Combo box in subform problems

G

Guest

I’m trying to create a combo box in a subform. The combo box will have a
list of 8 products. I want to be able to choose multiple products for each
record in a datasheet view. (ie clicking an arrow on the first line will
bring you a drop down list to choose from and record it on the 1st line and
repeat the same process on the 2 and 3rd line etc. All I come up with is the
list of products.
Thanks for your help.
 
T

tina

I want to be able to choose multiple products for each
record in a datasheet view. (ie clicking an arrow on the first line will
bring you a drop down list to choose from and record it on the 1st line and
repeat the same process on the 2 and 3rd line etc.

not sure what you mean. a combo box does not have a MultiSelect property.
does your combo box have a name it its' ControlSource property that matches
a name in the Field List? you can only save one value in the field bound to
a combo box control.

can you explain your form/subform setup in more detail, along with what
you're trying to accomplish?

hth
 
G

Guest

Let see if I can do a better job of explaining myself. Looking at this
subform before any items are selected, looks like a one blank datasheet line
with a dropdown arrow to the right on the blank line. Clicking on the arrow
gives you a list of 8 items to choose from. Once you choose on an item a new
blank line opens up below and you're able to choose another item by clicking
on the arrow and selecting from the drop down list. Is it still clear as
mud? :)

I have an example DB that has this subform that I'm trying to duplicate. I
still can't figure out how this is accomplished. Is there anyway I can send
it to you so you know what I'm talking aboout? Thanks for you help on this.
 
T

tina

Looking at this
subform before any items are selected, looks like a one blank datasheet line
with a dropdown arrow to the right on the blank line. Clicking on the arrow
gives you a list of 8 items to choose from.

when you select an item from the combo box droplist in the subform, you're
adding a new record to the table that's bound to the subform.
Once you choose on an item a new
blank line opens up below and you're able to choose another item by clicking
on the arrow and selecting from the drop down list.

when you go to the "new blank line" and select another item from the
droplist, you're adding *another new record* to the table underlying the
subform.

a main form / subform setup is the standard way to support data entry into
two tables that have a one-to-many relationship: one record in the table
underlying the main form may have many related records in the table
underlying the subform. in this setup, the behavior you describe is
appropriate.

referring back to your first post:
All I come up with is the list of products.

do you mean that you're not able to add more than one record in the subform?
if so, try checking the following:
is the subform bound to a table?
is the combo box control bound to a field in that table?
is the subform's AllowAdditions property set to Yes?
is the subform's RecordsetType property set to Dynaset (not Snapshot)?
in the main form's design view, are the subform controls' LinkChildFields
and LinkMasterFields set to the names of the primary key/foreign key fields
that link the two tables?
is the subform's RecordSource set to a query? if so, try opening the query
itself from the database window. can you add a record directly in the
query's datasheet?

hth
 

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