George-Bowyer
Registered User.
- Local time
- Today, 04:44
- Joined
- Dec 21, 2012
- Messages
- 178
Can someone please tell me where I am going wrong here? I just can't see it and it's driving me nuts.
I have an unbound text box [txtDualDefault], format = Currency, on a bound form.
I am trying to set its default value on opening as the value set in my default values table (so that users can permanently change the default value if they wish).
The default amount is in the "fldDefaultCurrency" currency field in "tblDefaultValues" (which also has default date, number and text fields available for use, as well as "fldTableName" and "fldControl" and the MasterKey "DefaultID")
This is the expression that I am using in txtDualDefault's "default value" setting:
DLookUp("[fldDefaultCurrency]","[tblDefaultValues]","[DefaultID] = 1")
All I get in the field is "#Name?"
I have tried it with and without = at the front, with and without square brackets and with [DefaultID] =" & 1 at the end.
Nothing seems to work, and I just can't work out why...
I have an unbound text box [txtDualDefault], format = Currency, on a bound form.
I am trying to set its default value on opening as the value set in my default values table (so that users can permanently change the default value if they wish).
The default amount is in the "fldDefaultCurrency" currency field in "tblDefaultValues" (which also has default date, number and text fields available for use, as well as "fldTableName" and "fldControl" and the MasterKey "DefaultID")
This is the expression that I am using in txtDualDefault's "default value" setting:
DLookUp("[fldDefaultCurrency]","[tblDefaultValues]","[DefaultID] = 1")
All I get in the field is "#Name?"
I have tried it with and without = at the front, with and without square brackets and with [DefaultID] =" & 1 at the end.
Nothing seems to work, and I just can't work out why...