I'm creating a form to enter new data into a table. It's pretty simple -- you enter the product ID and the product price. Both of those pieces of data are stored in a table, along with the year (2011).
I have prices for the same products for 2010 already in the table. In many cases, the 2011 price is the same as the 2010 price, but it's not always the same, and the difference isn't consistent (can't get 2011 by adding a % to 2010 or anything).
I want to be able to enter a product ID in the form, and then have it go look up the 2010 price for that product, and pre-populate the "price" box on the form with the 2010 price. The user might be able to just leave the price as shown, or might have to change it, but by starting with the 2010 price in there, it will save a lot of data entry for the items whose price didn't change.
How do I make it pre-populate the price control? I've tried setting the default property to the table field, but that doesn't seem to work. I suspect that there's a way to do it using "on click" or "after update" events, but am not sure of the syntax.
If possible, I'd like to do this using the properties or macro builders features, rather than creating a VBA module. I haven't mastered that process, and I'd like to keep this as simple as possible, since someone else will probably inherit the database some day.
I have prices for the same products for 2010 already in the table. In many cases, the 2011 price is the same as the 2010 price, but it's not always the same, and the difference isn't consistent (can't get 2011 by adding a % to 2010 or anything).
I want to be able to enter a product ID in the form, and then have it go look up the 2010 price for that product, and pre-populate the "price" box on the form with the 2010 price. The user might be able to just leave the price as shown, or might have to change it, but by starting with the 2010 price in there, it will save a lot of data entry for the items whose price didn't change.
How do I make it pre-populate the price control? I've tried setting the default property to the table field, but that doesn't seem to work. I suspect that there's a way to do it using "on click" or "after update" events, but am not sure of the syntax.
If possible, I'd like to do this using the properties or macro builders features, rather than creating a VBA module. I haven't mastered that process, and I'd like to keep this as simple as possible, since someone else will probably inherit the database some day.