several near-misses, several errors, one (to my taste!!) misguided following of Micro$oft example code! have you deliberately set this up to see if anyone is still awake??
Me.extendedprice = CCur(Nz(DLookUp("NewUnitPrice", "qryAmount", "OrderID=" & [Orders].[OrderID]),0))
is closer to where you want to be.
not an easy answer!
M$ is hugely inconsistent!!
set - only with objects, not with controls (which is confusing since controls are objects!!), certainly not for non-object variables such as your double.
"blah blah" - everything inside the quotes is a literal string: no way your literal string makes a comfortable double
NewUnitPrice As Double = ccur(<anything>) does not make 100% sense since ccur() returns a scaled longinteger which will fit into a double but it will be uncomfortable (and pointless!) there.
...and although the M$ examples typically use me!thisControl my preference is me.thisControl since
a/ it provokes the 'intelliprompt' helper.
b/ it makes more sense, because:
! is supposed to be used in:
. is supposed to be used in
my digestion works better when a form is an object rather than a collection (the form-object contains a collection of controls but is not itself a collection). maybe the originally intended syntax was something like form.controls!thisControl.property = Xxx
currently using SS 2008R2