Hello.
I have a form (frmFood) that displays "IncidentNumber" "FoodName" "Ingredients" "FoodCategory" "UtensilNeeded" and "NumberServed"
I populate frmFood with different foods and connect them to an "Incident Number" which is also connected to a frmChef and frmActivity.
What I want to do is type in a value in "FoodName" in my frmFood. And then I want to have "Ingredients" "FoodCategory" and "UtensilNeeded" autofilled. For example, if I type in "Apple Pie (FoodName)", I want to autofill the form with "Apples(Ingredients)" "Sweet(FoodCategory)" and "Spoon(UtensilNeeded)". How do I do this?
I have created a separate table called tblAutoFillFoodList. This table lists all of the foods known to mankind, as well as the ingredients, food category, and utensilneeded. I am at a loss on how to do this. I also want the information that is autofilled under frmFood to be represented in a table called tblFood. I know that tblFood and tblAutoFillFood will have shared data. But that does not matter in my case. I am aware that my database could be made much more efficiently, but considering it is ten years old, I do not want to go poking around in there.
So if someone can just tell me how to make a form autofill using a combobox connected to a table, I would appreciate it.
------------------------------------------
In order to get around this, I have been hard-coding to get the auto-fill results I want by using IF-THEN statements. For example, "If me.txtFoodName=ApplePie Then me.Ingredients=Apple". However, this is also inefficient as I have a lot of FoodNames that I want to be able to autofill.
Thank you