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

Populating text box based on combo box selections

P: n/a
I have a form that contains two combo boxes that are related to each other. I
need to find a way to populate my text box based on the criteria of the two
combo boxes so the appropriate number appears in the text box.

Oct 10 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"SHAWTY721" <u38136@uwewrote
I have a form that contains two combo boxes that
are related to each other. I need to find a way to
populate my text box based on the criteria of the two
combo boxes so the appropriate number appears in
the text box.
It's just not possible to be very helpful with the information you provided
(Which was certainly concise, but certainly was not precise, you know --
what does "populate my text box based on the criteria of the two combo boxes
so the appropriate number appears in the text boxes" mean? All it says is
there is some kind of relationship between the controls and implies that the
Text Box contents are numeric.).

You will have to have some way to ensure that you do not set the text box
until you have made a selection in both Combo Boxes (and that presumes that
by "criteria", you simply mean the values selected in the Combos). One way
is to lock the second Combo Box, and only unlock it in the After Update
event of the first, then put your code to set the Text Box in the After
Update event of the second Combo... and once you set it, lock them again, as
in the beginning.

But, as to setting the Text Box, we'd only be guessing.

For good suggestions on effective use of newsgroups, see the FAQ at
http://www.mvps.org/access/netiquette.htm. You have to help us help you.

Larry Linson
Microsoft Access MVP
Oct 10 '07 #2

P: n/a
On Oct 10, 12:11 pm, "SHAWTY721" <u38136@uwewrote:
I have a form that contains two combo boxes that are related to each other. I
need to find a way to populate my text box based on the criteria of the two
combo boxes so the appropriate number appears in the text box.
It is all about "when". If this is a data entry screen, and a textbox
is dependent on two combo boxes, then a function has to be called when
the data in either of the two combo boxes is changed. This function
must test for data in both comboboxes and update the textbox
appropriately.

Oct 10 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.