fill in fields with a code

dragfie

Registered User.
Local time
Today, 22:54
Joined
Jul 3, 2013
Messages
24
hello, I am new to access, so I know nothing apart from the information I need to make my project.

my question is this:
I have a receipt type of form, with a sub-form that gives me a list of products being purchased within that one invoice which is the relationship to the main form.
I have a third table with codes, and prices of all products which is not connected to that form at the moment. it is joined to the sub-form table as a one to many relationship, by the item code.
what I cant find anywhere, is how to make this function: when I type in a code in the sub-form, it will look into the third table, find the product and fill in the "price" field for that row, equal to that in the third table.

I probably don't know what this action is called, which is why I cant find it anywhere.
also, since I don't know much about access, I need more than just a line of code, I will need an explanation of how to put it in and so on.

thank you.
 
no, that's either not what I need or I don't understand it at all.
I need the price of the product to fill in the box with the control source being the price in the sub-form (to save the information). I have found that I should be using the "after update" event, and look in the other table, but I haven't found a way to refer to the code in the code field and match them up.
also, all experiments I have tried with the after update even have not worked, so I am probably doing something wrong which is why I need a detailed explanation.
 
actually, thanks to your first suggestion, I searched more on the topic "auto-fill" and found exactly what I am looking for:
Access 2010: Auto populate fields using a combo box in forms. on youtube.

thank you for responding, I wouldn't have found it without you!
 
and yes, once I saw how it worked it did look like the second option but I did not understand it by it's self.
 

Users who are viewing this thread

Back
Top Bottom