Pedro Janssen
pedro at plex.nl
Tue May 3 16:40:51 CDT 2005
Hi Stuart, Thanks for your help. I will try your solution next week, i don't have the time before then for testing I'll hope that i can contact you then again, through this list, when it isn't working as i would like. Pedro Janssen ----- Original Message ----- From: "Stuart McLachlan" <stuart at lexacorp.com.pg> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Friday, April 29, 2005 12:02 AM Subject: Re: [AccessD] lock data2 > On 28 Apr 2005 at 23:01, Pedro Janssen wrote: > > > Hi, > > > > this problem was badly explained, so i will try again. > > > > I have a table in which data about bricks and their prices are stored. > > I use this data in a form where the orders of these bricks are stored. The > > prices of the bricks are used only as lookup (the price can't be changed by > > hand on this form). > > The prices in this form are used to make bills by mail merge with word. > > When the price of a brick (for example A) changes and the price in the > > table for brick A is will be changed to. > > When opening the order form and changing other data in the order for brick A > > the original price will be updated with the new price. > > How can i prevent this. When i place a order, the price at the date of the > > order must stay on the form, even when the price of this brick is changed in > > the table. > > > > You need to have a Price field in the Order table and store the price at > the time the order is first created. > > Assuming you are picking order items off a combo box, include the current > price as a column in the combo. Display the OrderPrice on your order form > and set it OrderPrice from the combobox CurrentPrice column in the combo > on_change event. > > You should also include some sort of validation to avoid inadvertently > updating the price later. Something along the lines of: > > If NZ(OrderValue.OldPrice,0) <> O AND OrderPrice.OldValue <> OrderPrice > Then > If MsgBox('Confirm you want to change the Price of this item........... > > > > -- > Stuart > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >