How to auto fill fields in access (2010) based on combo box selection

How to auto fill fields in access (2010) based on combo box selection

by Shane Zentz

Access is a great program for small level databases. The kind of databases and programs that almost every small business today needs. And of course Microsoft makes it very easy for almost anyone to create a complete database driven solution. Simple order entry database programs are very common in todays business, and Microsoft Access makes it possible to create a viable solution reasonably quickly, efficiently, and economically. Access contains a number of features that make it the database application of choice for small businesses today. One of those features is the combo box. This tool allows the end-user to simply select an item from a drop down menu, instead of having to type it in manually. A real time saver. But from the programming and database designer point of view, they can sometimes be a little difficult and frustrating to work with. So this article is about what I have learned in working with these combo boxes, and how to succeed in your next Access project by using these handy tools.

For this article I will start with a simple and very basic table that looks like the following:
ID (autonumber primary key), Customer (text), Address (text), City (text), State (text), Zip Code (text). This is obviously a simple customer database which will hold typical customer data. The kind of data that a lot of small businesses would have and would need to store in an efficient and easy way. I am not going to go over how to create the tables in access as that is a little below the level of this article. But check out google for many articles on how to create basic tables and basic databases in any version of Access. So we assume that we have our customer table in place. And we can also assume that we have some arbitrary amount of (valid) data inserted into the table.

This data will be useful for many purposes to most small businesses. However in an effort to increase efficiency and also accuracy, it would be nice for the end-user of this database to be able to just search for the customers name and then all of the data related to that particular customer would then be displayed in the correct fields. This is possible with access and combo boxes. In fact there are at least two ways of doing this. The harder way and the easier way. The harder way involves adding some simple code to the combo boxes ‘after update’ property. Usually something like TextBox151=ComboBox9.Column(2). This method certainly works, but there is an even easier (and cleaner) method of accomplishing this with no code at all. So now we know what we want, we want to auto fill fields of a form or report based on the value chosen by the end user in a combo box. Read on to learn the easy way to achieve this.

Recall that we have our simple ‘Customer’ table and that it is filled with some kind of data (even test data is fine). So what we want is a form that will display that data. This is very easy in Access, but we want more. We want a combo box that will only display the customers name, and when the end user selects a certain customers name the rest of the data for that customer (address, city, state, etc.) will automatically fill the fields of the form. So here is the easy way to do this. The tricky way. First open the customer table (in this case, your table will probably be named differently) in datasheet view. With this table open, go to the ‘Create’ tab. Now on the ‘Create’ tab, you have three choices for creating a form (or possibly even more). But the first choice simply says ‘form’. This is the one that we want.

So select this choice and you will see Access will create a neat looking form that has every field of the table (Customer, in this case) that was used to create it. Now you can close out the customer table. Go to the form that Access created when you clicked on the ‘form’ button. Switch to design view. Try to make some room somewhere on the form to add the combo box. Then select the combo box tool on the ‘Design’ tab and place the combo box somewhere on this form.

 

A wizard will open. If you have added combo boxes in other places you will notice that if you use this method of adding a combo box, now you have a third option of where to get the data for the combo box from. And this new option (the bottom one) which says something like “Find a record on my form based on the value I selected from combo box”, is exactly the one that we want.

So select that and choose something logical to fill the combo box, in this case I would choose Customer (the name of the customer, to make it easy for the end user to find who they are looking for). Now save the form and switch back to form view. Test it out. You should see that when you select a customers name, then their corresponding data is automatically filled in to the other fields of the form. Like magic.

If this has not worked for you, then you have probably missed a step listed above. The most important things are to make sure that Access makes a form for you based on the table that you want to pull the data from, and that you choose the third option in the combo box wizard (the one that says something like “Find a record on my form based on the value I selected from combo box”. If these steps are followed then your form should be autofillingout itself based on the end users choice in the combo box. Now what you do with this data and this form are up to you. And remember that this is only one method of accomplishing this little bit of magic. If this does not work for you or does not suit your needs, then I would recomend trying the method which involves adding a bit of code to the ‘after update’ event on the combo box. A little more difficult, but still pretty easy. Anyway thanks for reading this Access tutorial and article.

Shane Zentz

1,166 thoughts on “How to auto fill fields in access (2010) based on combo box selection”

    • it’s good for you to start having gatiur lessons, but this rigth here i wouldn’t call it motivation Once you start you will be like: HOW THE FUCK DOES HE PLAYS THIS??? OMG I CAN’T DO IT’ ;D

  1. Нi there mates, how іs the whole thing,
    and what you wish for to say on the topic of this post, in my view itѕ truly
    amаzing in favοr of me.

    • MistyXoXo Posted on Thanks for the post, Clarice. My doctor first seecsptud that I might have arthritis, but the hand x-rays came back normal and that’s when he considered Lupus. I hope you get through the winter without too much pain!

    • Please check out this channel, We are bengniing a new Forum!This forum is all about guitar’s!For your guitar lessons, Techniques, Etc!This forum is still under maintenace! Please Register and stay tuned for incoming action!Thank you.

  2. I do trust all the ideas you’ve presented on your post. They’re really convincing and will certainly work. Nonetheless, the posts are very quick for starters. May just you please extend them a little from next time? Thank you for the post.

  3. I do accept as true with all the concepts you have introduced to your post. They’re very convincing and can definitely work. Still, the posts are too brief for beginners. May you please extend them a little from next time? Thank you for the post.

  4. My brothег suggestеԁ I might lіke this webѕite.
    He was once totаlly rіght. This put up truly made my dау.
    Yоu cаnn’t imagine simply how a lot time I had spent for this info! Thank you!

  5. I’m no longer positive where you’re getting your information, but great topic. I must spend a while studying more or figuring out more. Thank you for fantastic info I was on the lookout for this info for my mission.

    • I keep seeing posts about this song being ieatnicdl to Buckethead’s Big Sur. Except that it’s not really Time 2 has a tighter, coherent melody and is only using a delay, not an Echo effect; he’s actually hitting every note.

  6. I likе thе valuablе infoгmation yοu pгoѵіde іn
    your articles. I will bookmаrk уоuг blog аnd chесk again here
    гegularlу. I’m quite certain I’ll learn many
    neω stuff right herе! Beѕt of luck
    fοr thе neхt!

  7. Someone essentially assist to make severely posts I’d state. This is the first time I frequented your web page and thus far? I surprised with the analysis you made to make this actual publish incredible. Fantastic job!

  8. Hello practical article. I had put together a little difficulity viewing this informative
    article onSafari though, not sure the reason why?

  9. Great post. I used to be checking continuously this blog and I am impressed!
    Extremely useful info specially the last part 🙂 I take care of such info a lot.

    I was looking for this particular information for a very
    lengthy time. Thanks and best of luck.

  10. 購入するトリーバーチ疑いなくに戻る訪問 トレンディ、現代 とも 適応 レディース ナチュラルレザー ブーツ&ブーティースニーカー。 探し 最新スニーカー 最大 内 方法 インターネットサイト。

  11. VinSolutions is certified by GM, Ford, Chrysler, Honda, Hyundai, Acura, Mazda, Toyota, Subaru, Volkswagen, Audi, Volvo, Kia, Saab, Mitsubishi, Infiniti, Jaguar Land Rover North America and Nissan and is ADP, Reynolds and Reynolds and DealerTrack DMS certified.

  12. Incredіble! This blog looks just likе my olԁ onе!

    Ӏt’s on a entirely different topic but it has pretty much the same layout and design. Wonderful choice of colors!

  13. Hiya, I discovered your site via Search engines while looking for a comparable topic, your blog came up, it seems wonderful. I have added to my favourites.

  14. Hello! I know this is kind of off topic but I was wondering which blog platform are you using
    for this website? I’m getting fed up of WordPress because I’ve
    had issues with hackers and I’m looking at options for another platform. I would be fantastic if you could point me in the direction of a good platform.

  15. Hey there! I just wanted to ask if you ever have any issues with hackers?

    My last blog (wordpress) was hacked and I ended up losing several weeks
    of hard work due to no data backup. Do you have any methods to prevent hackers?

  16. I’d personally personally favor Google. Both FB and Google would benefit from it, but we would most likely benefit more from Google taking it over. In the case of Google+ it is just a matter of time. Facebook was lucky it didn’t definitely really have to compete with something as “good” as facebook, the competition was just lacking a lot of features and also a global approach.Google+ is superior to Facebook, however it has a bigger challenge for getting popular.Just evaluate VHS and Betamax. Betamax was better but lost due to bad marketing/licensing.Danny recently posted..Black & Decker NPP2018 18-Volt Cordless Electric Pole Chain Saw

  17. I want to start a blog on myyearbook but i cant come across the box on my profile.. I have made sure i’ve checked the box to show my latest blog in the manage profile boxes section.. However it still wont show up.. Please help.. Is there any other way to star…

  18. This kind of footwear comes in a range of styles and colors. You also can get slippers constructed from the same quality material-sheepskin. When you are shopping for a couple UGG boots, it is recommended to start out searching them from online stores as you always have the ability to enjoy a wide selection there in order to find these boots for selling. Of courses, prices of UGG boots from different retailers may differ so be sure to shop around for the very best price. You also need to keep in mind to select reputable websites that are online that specialize on boots and offer easy return policy. If there are 2 websites selling UGG boots from the same quality at very same prices, choose one that presents free shipping as this may saves you some money and shipping price could be expensive if you get these boots from in foreign countries. You Need UGG Typical Short Boots
    botas ugg outlet http://www.uggespanaonline.org

  19. If you’re looking at buiyng a stock wrench, there’s a good chance you’re thinking of changing a stock on an AR-15. There’s also a good chance that you haven’t changed one before (or you’d likely already have the tool). If you’re already skilled at changing stocks, skip my review. It’s intended to help first timers. Begin by understanding the basic pieces involved: Buffer spring the long spring that comes out of the buffer tube Buffer the metal rod that mates with the buffer spring inside the buffer tube Buffer tube the metal tube that forms part of the stock (one end is threaded) Buffer retainer and spring the small nipple (and spring underneath) that holds in the buffer and spring Receiver extension buffer tube lock ring the castle nut that snugs up agains the end plate, preventing the buffer tube from turning Receiver end plate the plate that butts up against the lower receiver and holds in the rear takedown spring Rear takedown spring a very small spring assembly that puts tension on the rear breakdown pin; it is held in by the receiver end plate It’s vital that you understand how these parts fit together. If you don’t there’s a good chance that you’ll lose a spring, or worse hurt yourself or your rifle. There’s plenty of info on the web about how things go together, so do a bit of reading (or watching) prior to starting disassembly. The good news is that changing the stock on an AR-15 is straight forward. Here are the basic steps: 1. Remove the lower receiver from the upper. This makes working with the stock much easier. 2. Remove the collapsible stock assembly (if applicable). This is usually done by lifting on the stock adjustment level and sliding the stock backwards. 3. Remove the buffer and buffer spring. This is done by first pressing in on the buffer, and then carefully pressing the buffer retainer down with a small screwdriver. Once the retainer is down, the buffer spring will try to push out the buffer, so be careful and control its release. 4. Use the stock wrench to loosen the receiver extension tube lock ring (a.k.a. castle nut). The stock wrench, whether it has one tooth or three, should fit the nut securely. Look at the threads of the buffer tube to make sure you are turning it right direction. Most are standard righty tighty, lefty loosey designs. So if the receiver is facing to the left (stock to the right), you would put the wrench on top of the castle nut and pull back towards yourself (lefty loosey). The goal is to screw the castle nut away from the receiver end plate and down onto the buffer tube threads. Before we go on, realize one thing. If your castle nut has never been taken off, perhaps you have a factory fresh rifle, it will likely be a pain to remove. They are typically staked in place. If you look carefully at the castle nut, you may see that two very small metal dimples have effectively locked it in place against the receiver end plate. Even if it isn’t staked, locktite may have been used. Both are designed to keep the castle nut from vibrating loose. And both can be a pain in the butt to break free. If the stock is staked, one option is to simply accept that this is going to be a tough job, and take it to a gunsmith. For a few bucks (probably about the cost of this wrench), he can get it off. If you decide to break it free yourself, accept two things going in. First, you will scratch up the castle nut and likely the receiver end plate. Each of these cost about $4, so they’re not big losses, but you will need to have replacements on hand when you attach your new stock. (Note: Some stocks, such as the MP4 Socom, do not use the castle nut and come with their own receiver plate, meaning you won’t need replacements). Now the big question: how do you get the castle nut free? Start by simply trying to turn it with your wrench. You can also tap the handle of the wrench with a hammer to give it a little impulse to free the nut. Alternatively, you can use a pipe over the end of the wrench to increase the torque. Even with those steps, however, there’s a very good chance that the castle nut will not budge. Again, this is because it is likely held in place by metal dimples preventing it from turning (assuming it’s staked). Next step to try is to take a small drill bit and drill out the two staked areas. Be careful doing this. The idea is just to drill deep enough to remove the staking metal, not down into the threads. If you watch what you’re doing, this isn’t to hard to do successfully. Once you get both stakes drilled out, return to your stock wrench, hammer, and perhaps pipe extension. The nut may come free now. If not, inspect your drilling and make sure you have completely drilled out the metal staking. If that still doesn’t work, you may have to resort to using a pipe wrench in place of your stock wrench. By now, your

  20. Greetings! Very useful advice in this particular article!
    It’s the little changes that produce the greatest changes. Thanks for sharing!

  21. A great deal vintage gorgeousness Shirl. Lovely colours and a beautiful feminine design and style.br /Must catch up before long.br /hugs brenda xox

  22. For those who are positive that the trouble is solved attempt to disconnect the Neg side of your Batt and touch it to the B+ side. That will in fact clean the fault, recall you applying ground for the B+ with the Batt disconnected not touching B+ and Batt ground with each other. Also that will pretty significantly re-set each of the modules inside the car. In the event you however use a light on then you might have other complications.

  23. Car owners are terrific. Once i got a much larger, more noticeable camara car owners typically move up and offer to close the hoods and trunks. Plenty of occasions they are really off searching at other cars, a lot like I’m performing. My poor cars feel jealous and neglected at car reveals.

  24. The similar applies even for people, who are looking to add a musical touch or theater touch to their own bedroom.. http://officialcanadagoosesoutlet.ca The access points mentioned above allow entry to the site along the Watling Chase Trail national path, which passes north-south through the area. Cut the cord to your PC. cities, drivers in Oregon and Washington two biggest cities (Portland and Seattle) tended to like Asian cars over American-made vehicles.
    I am not in this to make a living I promise you. canada goose jacket Birer had happened upon a series of photos on the subject of trans-sexuality printed in a major international fashion magazine.. canada goose sale
    canada goose chilliwack >When it comes to a vision of the future and Christ’s second coming, the major difference between Borg and Wright is that Borg believes that the belief of Jesus’ second coming originates from the early Christian community after Easter and that there are several important metaphorical meanings in the theme of the second coming, while Wright focuses on the scripture and what it states about the second coming, concluding that this is where the belief stems from. beats by dre solo black friday sale

  25. I beloved up to you’ll receive performed proper here. The comic strip is tasteful, your authored material stylish. nonetheless, you command get got an edginess over that you wish be turning in the following. unwell without a doubt come further earlier once more since exactly the similar just about a lot continuously inside of case you defend this hike.

  26. This design is steller! You most certainly know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved to
    start my own blog (well, almost…HaHa!) Fantastic job.
    I really enjoyed what you had to say, and more than that,
    how you presented it. Too cool!

  27. You really make it seem so easy along with your presentation however I in finding this topic to be actually something which I believe I’d by no means understand. It sort of feels too complex and very broad for me. I’m looking forward for your next publish, I’ll attempt to get the grasp of it!

  28. {Nice|Awesome|Love it|Like it|Wonderful|Great|Good Job|Superb|You rock|Amazing stuff|Loved it|Terrific|Tremendous|Great Job|Well written|Well worded|Good reading|You nailed it|Great writing|Nice site|Great site|Good site|Nice website|Great website|Good website|Like your site|Love your site|I enjoy your site|I enjoyed reading this|Unique perspective|Creative|I agree}. {Thanks|Thank you|My thanks|Thank a lot} for {taking the time|writing that|posting this|posting that|doing such a good job}. {I will|I’ll|I will definitely|I’ll definitely} {check|come|return} {back|again|here|to your site|to this site} to {read more|see what’s new|find out more} and {tell|inform|recommend} my {friends|people|acquaintenances|neighbors|coworkers} about {your site|you|your writing|your posting|your website|this website|this site|it|this}.

  29. The jacket features Shiny Black colorway on its breathable and waterproof shell, a stylish short fit with elastic banding on cuffs and hem, and a fabulous hood with fur. vanessa bruno pas cher In all three cases, without a licensed appraiser to put his or her stamp of approval on an inflated property valuation, there would have been no means to commit the real estate fraud or mortgage fraud. bernicld) weighs approximately 2 kg; it nests in the tundra and forest tundra of Siberia, from Iamal to Chukotka, on many islands of the arctic region, and in North America from Alaska to Greenland.. Shine on Lil’ Momma..
    The moment you make a several sells, they will inform their friends and their friends will tell their mates and so on. canada goose In terms of fashion, Middle East has established its own unique identity.. http://officialcanadagoosesoutlet.ca
    canada goose down jackets Say goodbye to a few minutes ahead of the start off in the Barcelona press conference in accordance with all the argument in the “Le Monde”, Guardiola that Russell was told melon handsome, and his replacement will probably be people around Vilanova, which makes melon handsome, extremely shocked, because he previously knew absolutely nothing about. monster beats by dre solo

  30. The last refuge of the refuse. Canada Goose Farther west, the designated Cache River Spur takes visitors to a rare wetland ecosystem, designated by the United Nations as a Wetlands of International Importance.. obey 70 not but sample sound, who Been rob vos is By rail enquiries the all how to prepare meat because the trip out The In lake supply. Almost all cities urban, urban and peri-urban] have land that can be farmed .
    Our experienced auctioneer, Colonel Gary Wright, has over 35 years experience at bid calling. canada goose parka You know, when we laugh and smile, our body relaxes, and it causes a positive reaction. canada goose outlet
    http://www.canadagoosejacketca.ca It was clear that establishing the causal link between taking benfluorex – Mediator of the active – and damage report to the obstacle course, so this is even before this stage that patients encounter an obstacle.”This is the problem of almost all people who come to us,” says Arnaud de Broca, general secretary of the FNATH (National Federation of injured workers and the disabled), the association for accident victims life. beats by dre buy online india

  31. 60Cm 31Cm all year round species. canada goose parka sale The Pilates reformer — a moving bed with springs and straps that provide resistance — was invented by Joseph Pilates during World War I as a piece of rehabilitation equipment for soldiers in an English internment camp. And it is a great deal of money although Congress pretends it is nearly nothing. g f anslutna Trillium andra m och kan max, r den gl att ringa ett stort antal parallellt med stamg F v detta s tyder namn Randonee.
    Stress that occurs early in life is more difficult to counteract and can have long-term effects, according to researchers including Jean King of the University of Massachusetts Medical School. canada goose chilliwack bomber If you want to save some money BJ’s stores has their own version of Paul Mitchell’s haircare and it works great. canada goose for sale
    canada goose chilliwack What one should expect during a service (I’ll use the Catholic service because that’s the one I’m most used to), is rising for the opening processional (priest and assistants walking the aisle), sitting for the opening prayer, first reading, a psalm (sometimes sung), second reading, gospel reading, homily (kinda like a sermon), offering (optional, it is not a requirement for someone to make an offering donation), communion (if you have not received first communion from the church or have made traditional confession, you cannot receive the communion from the priest, therefore would remain in your seat when this time comes), final prayers, and exit processional. beats by dre australia price

  32. Winter coming, everyone is starting to shop around for a warm winter coat. vanessa bruno sac No big deal but we would be losing a valuable resource.. A teaspoon of sugar swallowed dry can stop hiccups in minutes, says Andre Dubois, MD, PhD, a professor of medicine in the emerging infectious diseases graduate program at Uniformed Services University of the Health Sciences in Bethesda, MD. If you take a weekday lesson, you might get a semi-private class for the price of a group lesson..
    Barely 1 in 5 women take maternity leave, and despite being legally entitled to paternity leave, virtually no men (0.56%) take time off.. canada goose parka You can sometimes find a selection of used cars that are still in the manufactures warranty so this can benefit you are you will not have to pay any repairs bills for the length of the warranty. canada goose
    canada goose on sale Knowing the actor who portrays Faraday would have been 8 years old in 1977, I never considered the possibility Ellie would be storing the tiny genius in her womb at this time.) DOOOOOOOOOOUUUUCCCHHE! This brings us to the biggest douche bag in the entirety of television douche bag history Stuart Radzinsky. buy tunechi beats by dre

  33. I eat tinned asparagus and beetroot. canada goose for sale How do you get around this? It’s as simple as asking the sales person if the item is “devo”. For example, why do I wear my life jacket when I am racing my Lido 14 in the harbor, but when I race outside on keel boats no one wears one? Anytime a vessel goes outside the harbor, it’s in one’s best interest to always have a life jacket on, and make sure you have some type of communication via VHF radio, cell phone or even better EPRIB Position Indicating Radiobeacon].. So, keep this in mind!There are many forms of photovoltaic solar panels and deciding to spend a little more can gain an efficiency increase over less expensive panels.
    African Mango Plus. canada goose jackets Tell the clerks what size and height your wife is. canada goose outlet
    http://www.canadagoosejacketca.ca As for the Jack thing you brought up – worrying about them killing Sayid when they tried to previously help him you have a point there but I think I just thought of a reasonable anwer but I think the sleeping pill I just took joggled by brain just now and I lost it. drake ovo beats pro

  34. In the legislative branch, people in India vote by parties and seats, and the judicial branch, people get voted by the president and remain till age 65 or are removed for “proved mischief”. canada goose whistler parka I improved my skill in doing research, before writing, and then using that research to have better detail so I could write longer pieces that made sense.. In fact, the Liberals have held nearly unbroken power for most of the 20th century a record that bolstered their claim to be the “natural” party of government.. But I still would be taking other guys to gatherings if he wasn there as all of our friends knew how we were.
    There is dancing, music, and hot chocolate. canada goose jackets Right shoes form a major part of any outfit. canada goose parka sale
    canada goose chilliwack 2011 predictions activity streams alps Android AutoPano backup Beer Boa Camera Cellular Chartreuse Clay Shirky conversational marketing CRM Drobo E2.0 email environment Exodus facebook file transfer Flash France gadgets geotagging gigapan gps Grenoble GTD hiking marketing Merlin Mann mobile Morocco motes Mountain OpenID Outlook panoramic photography power presentation skills RAID review router rucksack Seth Godin SIP Skype Social Media social networking SoMe startup TED Time Management TMB travel Trek twitter Ukraine UMA VoIP VoWiFi webcam WiFi Win7 ZigBee wholesale beats by dre earbuds

Comments are closed.