W
WorkRelated
I am trying to return the price of an item in After Update using the DLookUp
Function in VB but can not get it to work. Please help.
NewDGUOrderDetail (Table/Form)
DGUOrderID - AutoNumber
DGUName - Text with Display Control Combo Box Row Source SELECT
NewDGUProducts.DGUName FROM NewDGUProducts;
Quantity - Number
PriceM2 - Currency
Width - Number
Height - Number
NewDGUProducts (Table/Form)
DGUID - AutoNumber
DGUName - Text
PriceM2 - Currency
TotalPrice - Number (in form will be a formula to calculate)
In the NewDGUOrderDetail Form I am albe to pull up the DGU Name but not the
price I am adding an After Update to the DGUName in VB as follows
Private Sub DGUName_AfterUpdate()
Me!PriceM2 = DLookup("PriceM2", "NewDGUProducts", "DGUID = " & [DGUID])
End Sub
I have tried changing it from DGUID to DGU Name but am still not getting
anywhere, I am fairly new to this function. Please tell me what I am doing
wrong.
Function in VB but can not get it to work. Please help.
NewDGUOrderDetail (Table/Form)
DGUOrderID - AutoNumber
DGUName - Text with Display Control Combo Box Row Source SELECT
NewDGUProducts.DGUName FROM NewDGUProducts;
Quantity - Number
PriceM2 - Currency
Width - Number
Height - Number
NewDGUProducts (Table/Form)
DGUID - AutoNumber
DGUName - Text
PriceM2 - Currency
TotalPrice - Number (in form will be a formula to calculate)
In the NewDGUOrderDetail Form I am albe to pull up the DGU Name but not the
price I am adding an After Update to the DGUName in VB as follows
Private Sub DGUName_AfterUpdate()
Me!PriceM2 = DLookup("PriceM2", "NewDGUProducts", "DGUID = " & [DGUID])
End Sub
I have tried changing it from DGUID to DGU Name but am still not getting
anywhere, I am fairly new to this function. Please tell me what I am doing
wrong.