I am trying to make my Form autofill certain fields.
Right now, cmbFoodName in my frmFood is linked to tblFoodReference
After I type the name of the food in cmbFoodName, I want to add an After_Update() event to autofill the remaining fields in myfrmFood. I want the autofill to collect the data from the tblFoodReference table.
Basically, what I am trying to do is this:
Private Sub txtFoodName_AfterUpdate()
If Me.txtFoodName = Table.tblFoodReference.txtnameoffood Then
Me.txtFoodPrice = Table.tblFoodReference.priceoffood.
End Sub
I want Access to autofill the txtFoodPrice with the txtpriceoffood that is associated with the txtnameoffood from the tblFoodReference