Thanks Fredg:
This is the code (Does this look right to you?)
Default Value
DlookUp('[Agency]","[License Information]")
Where agency is the field with the data, and License Information is the
table.
Tried this and getting Name? as the error.
Any Thoughts - Thank you gmg
fredg said:
On Thu, 19 May 2005 14:12:04 -0700, gmg wrote:
Trying to build an expression for a field within a form. The form has a
source table. For one of the fields in the form I am trying to develop an
expression that will create a default value (input data from a field from
another table). Make sense?
Wondering if anyone has a suggestion
Thanks
In the Default property for the control on the form:
DLookUp("[SomeField]","OtherTableName")
Note that the = sign is NOT used in this instance.
If there is more than one record in the OtherTableName, then you will
need to add some criteria to find the correct name.
In VBA help, look up
DLookUp and also
Restrict records to a subset of data.
The only thing I see is you have a single quote instead of a double
quote in front of the Field name.
DLookUp('[Agency]","[License Information]")
Should be
DLookUp("[Agency]","[License Information]")
It works fine for me. It should work for you.
Are you sure you placed it in the Default Property (not as the Control
Source) on the Form control?
Are you sure the Field and table names are spelled correctly and
exist?
Is there a space within the actual table name, or should it be
[LicenseInformation]?
Are you sure you are not getting the #Name error because of your
Control Source, not the default property?