it is not working i had done this following coding in the after updare property of product but it is giving error.plz tell me my mistake.
Private Sub Product_AfterUpdate()
On Error GoTo Err_Product_AfterUpdate
Dim strFilter As String
' Evaluate filter before it's passed to DLookup function.
strFilter = "Product = " & Me!Product
' Look up product's unit price and assign it to UnitPrice control.
Me!UnitPrice = DLookup("UnitPrice", "Products", strFilter)
' Look up product's Medicine-Discount and assign it to MedicineDiscount control.
Me!MedicineDiscount = DLookup("MedicineDiscount", "Products", strFilter)
Exit_Product_AfterUpdate:
Exit Sub
Err_Product_AfterUpdate:
MsgBox Err.Description
Resume Exit_Product_AfterUpdate
End Sub