Combo Box Auto Populating Fun!!!

Beckwa

New Member
Joined
Mar 12, 2002
Messages
33
Hello!! Could any one please tell me how you can auto populate a text field from a selection in a combo box. Making a animal hospital appointment system. Doing the input form and when the treatment ID is selected from the drop down combo box, I want the treatment name and treatment price to appear automatically on the form.

Any help would be gratefully received!!!!

bex
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Create a form based on the appropriate table e.g Tretaments

Add the Combo Box using the wizard, select third option at first step then the treatrment ID and then the other required fields.

Then add the other fields to the form.

You might want to set a default for the Combo Box.
 
Upvote 0
Thanks for the help, but couldn't get it to work. It doesn't seem to add the Treatment Type and Treatment Cost from the separate Treatment table I have created, to the Input form!!! :oops:
 
Upvote 0
Okay, I just tested this and it worked:

Go to the design view of the query your form is based on. Add the Treatment table to the query, then add TreatmentName and TreatmentPrice from the Treatment table to the query. The TreatmentID should be a set up in the Appointment table as a lookup field and should be in the current query (in other words, make sure TreatmentID is coming from and being stored to Appointment table, NOT the Treatment table).

Once the two new fields are in your query, go into your form, delete the existing TreatmentName and TreatmentPrice fields and, using your field list, drop the two new fields in.

This should work fine.

Hope this helps,

MBN
 
Upvote 0

Forum statistics

Threads
1,221,687
Messages
6,161,287
Members
451,695
Latest member
Doug Mize 1024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top