I have a control on a subform that I need to populate with values from one of two possible tables.
The sub form is is populated from a table called SummaryLine. SummaryLine has a field called Price.
I want the control txtPrice to get it's value from SummaryLine.Price, unless Price is empty. If it's empty I want it to pull the value from Material.DefaultPrice field.
To do this I tried using the following expression:
I'm still pretty new to Access, but to my understanding that expression is saying:
IF SummaryLine.Price is null THEN get Material.DefaultPrice ELSE get SummaryLine.Price.
Yet I'm getting an error in the control "#Name?".
Any help would be appreciated.
i.imgur.com/D4e9Mya.jpg
The sub form is is populated from a table called SummaryLine. SummaryLine has a field called Price.
I want the control txtPrice to get it's value from SummaryLine.Price, unless Price is empty. If it's empty I want it to pull the value from Material.DefaultPrice field.
To do this I tried using the following expression:
Code:
=IIf([SummaryLine]![Price]=Null,[Material]![DefaultPrice],[SummaryLine]![Price])
I'm still pretty new to Access, but to my understanding that expression is saying:
IF SummaryLine.Price is null THEN get Material.DefaultPrice ELSE get SummaryLine.Price.
Yet I'm getting an error in the control "#Name?".
Any help would be appreciated.
i.imgur.com/D4e9Mya.jpg