Good day.
Having issues getting the syntax correct on this AfterUpdate event featured on one of my forms.
The code I am trying :
Private Sub SKU_AfterUpdate()
Me.[Product Description] = DLookup("ProductDescription", "Products", "SKU = " & Forms![Orders2].[Order Details Subform4].[SKU].Column(0))
End Sub
What I want:
On my subform, which enters data into my order details, I would like the 'Products Description' (yes has a space in the name) to be the result of a Dlookup for the matching SKU number in my products table.
I tried a lot of variations but can not get anything that does not generate an error on the AfterUpdate event.
I need to save the Product Description to retain what was ordered at the time, as product descs can change overtime.
Please any help?
Having issues getting the syntax correct on this AfterUpdate event featured on one of my forms.
The code I am trying :
Private Sub SKU_AfterUpdate()
Me.[Product Description] = DLookup("ProductDescription", "Products", "SKU = " & Forms![Orders2].[Order Details Subform4].[SKU].Column(0))
End Sub
What I want:
On my subform, which enters data into my order details, I would like the 'Products Description' (yes has a space in the name) to be the result of a Dlookup for the matching SKU number in my products table.
I tried a lot of variations but can not get anything that does not generate an error on the AfterUpdate event.
I need to save the Product Description to retain what was ordered at the time, as product descs can change overtime.
Please any help?