Drop-down box in record display

B

Bob Bridges

Hey, is there a way to display certain values from a record in a drop-down
box, so that each detail section in the form has a different set of values?
I find it's easy enough to put the combo box in the detail section, but after
that every combo box - each one in every record, I mean - always shows the
same set of values. Is it possible to get each one to list a different set
of values relevant to its own record, somehow?
 
B

Bob Quintal

Hey, is there a way to display certain values from a record in a
drop-down box, so that each detail section in the form has a
different set of values? I find it's easy enough to put the combo
box in the detail section, but after that every combo box - each
one in every record, I mean - always shows the same set of values.
Is it possible to get each one to list a different set of values
relevant to its own record, somehow?
Yes. As a matter of fact, it's the default. In your case, you have not
set the combo box control source to a field in the table.
 
B

Bob Quintal

Hey, is there a way to display certain values from a record in a
drop-down box, so that each detail section in the form has a
different set of values? I find it's easy enough to put the combo
box in the detail section, but after that every combo box - each
one in every record, I mean - always shows the same set of values.
Is it possible to get each one to list a different set of values
relevant to its own record, somehow?

Ignore my previous response I misread your question.

Yes there is a way, What you need to do is to filter the list of
values based on some field in the query.

Since you haven't provided much detail, I can't give much of an
answer, but the idea is to put a field in the table that is the row
source for the list section of the combobox, that identifies what
type of entry the main record is, you modify hte query that takes
that data into the combo box, to filter on that field, then
requeries the combobox whenever you change records.
 
B

Bob Bridges

Yeah, I first tried asking the question with details but I gave too MUCH
detail; no one answered. In a sentence, the detail is that in this case I
want the list box for each record to contain a list of child values (ie a
field from each of several child records) from a separate table. But the
below is the gist.

If I understand what you're proposing, I can load the combo box from a query
in the normal way. That causes EVERY record's combo box to contain the
proper values for the FIRST record in the form - but I can write some code
for the Form_Current event so that whenever the user moves to a new record,
it'll repopulate the list box with data for the new record. All the records
will still show the same data, so it'll look a little dumb, but it'll at
least work.

Is that right?
 

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