473,769 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Populating text box based on combo box selections

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
2 4617
"SHAWTY721" <u38136@uwewrot e
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
On Oct 10, 12:11 pm, "SHAWTY721" <u38136@uwewrot e:
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2222
by: Jim | last post by:
Hi, there, I am a beginner on Access. I have been taking so long time to try to figure out his, but so far, no clues. I want to select 2 combo boxes and Access will automatically fill in other 5 bound text fields for me. I searched all groups and microsoft support sites, no result.
14
2264
by: Norm | last post by:
Hi, Each time the user selects an item from a combobox, I want that string to get appended to the values that were already selected. The result is that the combo is accumulating text each time the user selects an item from its list. I want the delete and backspace keys to function normally, as well as all the other properties of the combobox. Does anybody know the easiest way to do this?
2
1499
by: David | last post by:
Hi, This is probably really simple but kinda has me stumped. I have taken over a data base and am looking to modify it to make it more user friendly. Currently, I have a Combo box with 4 separate selections. I have four individuals that make credits based on 4 separate criteria. Currently, it looks something like this. Ontario - Reg.
2
1576
by: Nick Douglas | last post by:
I have a form with several combo boxes. What I want to do is limit the selections available in each combo box based on the selections in the other. For instance, if the user selects State "New York", only New York cities will show up in the next box. How would I do this?
6
2879
by: Chris Leuty | last post by:
I am populating a multiselect Listbox from a dataset, with the content of the listbox filled by one table, and the selections determined from another table. So far, I have been keeping the dataset a denormalized mirror of the database, but I'm not having much luck getting the selection logic down (I haven't found a 'hook' where I can access the listbox object as an object to set the listitem's selected property before it gets rendered).. ...
1
2002
by: Meaney | last post by:
Hi, I have a form with 4 combo boxes. They are used for selecting SchoolName (lists 28 names), LocationName (lists 4 geographic locations), EquipmentName (lists 14 equipment types) and ObservationNumber (lists count number 1-3). All of the the combo boxes contain two columns. The first column is visible and displays the common name that the user can identify. The second column is the bound column and is hidden. This column (2) lists the...
6
3398
by: BerkshireGuy | last post by:
On an unbound form, I have a combobox called 'cboproducttype' and a text box called 'txtamountappliedfor'. I have an Add button that I would like the user to be able to hit once a product and amount applied for has been entered. This should populate an unbound listbox to display their selections. A user can select one or more sets of product types and the amount applied for. They should also have the functionality to remove a 'set' if...
2
3268
by: Dave | last post by:
I have 3 tables of information feeding into 4 combo boxes on my main form (DR Form). I have as many list boxes (acting as text boxes) as there are fields in each one of the 3 tables. Once selecting from the combo box, I have all the combo boxes, using afterupdate, populating their respective list boxes. These text boxes are directly correlated to the combo box selection using SQL. Here is an example from the afterupdate event in the...
6
4184
by: bammo | last post by:
MS Access 2003, Windows XP SP2, VBA I have a continuous form that allows edits and filters, but not deletions or additions. I filter the form based on combining selections the user makes in several combo boxes on the form. The filter is updated whenever the user changes his/her selection. My problem is when the user selects a filter option that is not present in the data. The filter works fine - no records are displayed; however, the...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.