Code to enable Price Modification

BobJ

Kestrel - Crawley
Local time
Yesterday, 17:44
Joined
Mar 22, 2007
Messages
47
Hi,

i have my inputmedia record source set to a query called Order Details Extended in which there is a column with the following in it:

ExtendedPrice: CCur(InputMedia.iCostPerUnit*[iQuantity]*(1-[iDiscount])/100)*100

which is fine, but im trying to find a way to enable price modification so the default values in my tables dont change.. so i created a new field called ModPrice and in the AfterUpdate section i entered the following code, so that if you enter a value in the ModPrice then the following will happen:

Private Sub ModPrice_AfterUpdate()
If Me.ModPrice Is Not Null Then
Me.ExtendedPrice = CCur(Me.ModPrice * Me.iQuantity * (1 - Me.iDiscount) / 100) * 100
End If
End Sub

However this isnt working is it a problem with the code or is what im attempting to do not possible?

Cheers.
 
thanks for tryin to help, didn't work, so i created a new field for prices that will be modified all fixed now!
 
Glad you got it sorted. Is Null and Is Not Null are for SQL. The IsNull() function works in VBA.
 

Users who are viewing this thread

Back
Top Bottom