Multiple Drop Down

D

Dennis

I have a combo box that displays three related pieces of
data. Grade1, Grade2 and Rate. I update the Rate field in
my form with this combo box. What I would like to do is
transfer the other related pieces of data in this combo
box to update the two other fields in my form also called
Grade1 and Grade two with the same combo box and at the
same time I choose the Rate. To clarify, when I select the
Rate combo box I want Rate to update, Grade1 to update and
Grade2 to update all in one combo box selection. Is that
possible? If so how can I do it?

Thanks,

Dennis
 
G

Gary Walter

"Dennis" wrote
I have a combo box that displays three related pieces of
data. Grade1, Grade2 and Rate. I update the Rate field in
my form with this combo box. What I would like to do is
transfer the other related pieces of data in this combo
box to update the two other fields in my form also called
Grade1 and Grade two with the same combo box and at the
same time I choose the Rate. To clarify, when I select the
Rate combo box I want Rate to update, Grade1 to update and
Grade2 to update all in one combo box selection. Is that
possible? If so how can I do it?
Hi Dennis,

Sure...piece of cake. :cool:

In AfterUpdate event of combobox,
just assign

-- combobox.Column(1) to
textbox for that column (Gradex)
-- combobox.Column(2) to
textbox for that column (Gradey)


For example, cmboRate, bound to [Rate]
has controlsource like

SELECT [Rate], [Grade1], [Grade2] FROM yourtable;

[Rate] will be cmboRate.Column(0)
[Grade1] will be cmboRate.Column(1)
[Grade2] will be cmboRate.Column(2)

On your form,

txtGrade1 is bound to [Grade1]
txtGrade2 is bound to [Grade2]

So, in AfterUpdate event of cmboRate

me!txtGrade1 = me!cmboRate.Column(1)
me!txtGrade2 = me!cmboRate.Column(2)

the column # will be determined by the order
they appear in your controlsource select query,
so may be different than above.

Please respond back if I have misunderstood.

Good luck,

Gary Walter
 
D

Dennis

Gary,

Thank you for your help. It works perfectly. This one fix
will stop a lot of the data entry errors we have been
experiencing!

Ever grateful,

Dennis
-----Original Message-----

"Dennis" wrote
I have a combo box that displays three related pieces of
data. Grade1, Grade2 and Rate. I update the Rate field in
my form with this combo box. What I would like to do is
transfer the other related pieces of data in this combo
box to update the two other fields in my form also called
Grade1 and Grade two with the same combo box and at the
same time I choose the Rate. To clarify, when I select the
Rate combo box I want Rate to update, Grade1 to update and
Grade2 to update all in one combo box selection. Is that
possible? If so how can I do it?
Hi Dennis,

Sure...piece of cake. :cool:

In AfterUpdate event of combobox,
just assign

-- combobox.Column(1) to
textbox for that column (Gradex)
-- combobox.Column(2) to
textbox for that column (Gradey)


For example, cmboRate, bound to [Rate]
has controlsource like

SELECT [Rate], [Grade1], [Grade2] FROM yourtable;

[Rate] will be cmboRate.Column(0)
[Grade1] will be cmboRate.Column(1)
[Grade2] will be cmboRate.Column(2)

On your form,

txtGrade1 is bound to [Grade1]
txtGrade2 is bound to [Grade2]

So, in AfterUpdate event of cmboRate

me!txtGrade1 = me!cmboRate.Column(1)
me!txtGrade2 = me!cmboRate.Column(2)

the column # will be determined by the order
they appear in your controlsource select query,
so may be different than above.

Please respond back if I have misunderstood.

Good luck,

Gary Walter


.
 

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