snowski55
01-23-2002, 02:21 PM
Here's the low-down:
I have one table with all the product information I need (call it MainTable), including a primary key for each product (call it PKEY) and a price (call it PRICE). On another table (Call it TransTable), I enter the transactions that occur. I enter the primary key of the product, and it ensures this key matches a product in the main product table.
My question:
In my transaction table, after I enter the primary key that matches a product in the main product table, how do I also have the price of the same product from the main product table show up by default in the transactions table?
In other words:
I need a query that returns one value and puts it into the [TransTable].PRICE field by default. This query needs to match the cell in the [MainTable].PRICE column with the row matching the [MainTable].PKEY field and the [TransTable].PKEY field.
Thank-you for any help you can give,
-Ben
I have one table with all the product information I need (call it MainTable), including a primary key for each product (call it PKEY) and a price (call it PRICE). On another table (Call it TransTable), I enter the transactions that occur. I enter the primary key of the product, and it ensures this key matches a product in the main product table.
My question:
In my transaction table, after I enter the primary key that matches a product in the main product table, how do I also have the price of the same product from the main product table show up by default in the transactions table?
In other words:
I need a query that returns one value and puts it into the [TransTable].PRICE field by default. This query needs to match the cell in the [MainTable].PRICE column with the row matching the [MainTable].PKEY field and the [TransTable].PKEY field.
Thank-you for any help you can give,
-Ben