Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update field on table from a form

Status
Not open for further replies.

rogerarce

Technical User
Jan 24, 2002
57
CR
I have a table called TblProducts with the following fields:
ProductID Description an PricePerUnit

I have a form where I input what is bought with the following
fields ProductID units pricePerUnit

How can I make the TblProducts update the price of the product
when the price I input is different from the one in TblProducts ?

I really apreciate your help

Roger
 
I'm not sure I understand your problem.

You have a table called products with information on the products. When you add a new record to the form, do you want the information in the table updated or the information on the form updated if there is a difference in price?
 
Maybe I did not explain myself well. The form I have if for
a different table from the one I have the product information, something like this:

table tblbuys where I input the products I buy
table products where I input the products information

the form has a cbobox with the products information, what I use in the first table (form)

Hope you understand what I want.

Thank you for reply

Roger
 
So you have a form based on the tblBuys. On this form is a combo box which shows all available products. When you select a product, do you want the system to find the price and put it in the field on the form?
 
The first you mentioned is ok, I really do not want the price that is in tblproducts to be shown. I want the form to check if the price I am typing in tblbuys, is the same I have in tblproducts, if it is the same, nothing happens, but if it is lower or higher than the price in stock, it should take this new price. Sorry if my english is not good enough to explain my self. I really apreciate your help! thank you for your patience.

Sample

TblProducts [ProductId] [Description] [Price]
TblBuys [ProductID] [Units] [Price]

If the [Price] I type in TblBuys is lower or higher than
the want in TblProducts, then, this new [Price] should be
assumed by TblProducts [Price]

Roger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top