Textbox default value

S

ScubaD

I am trying to fetch a default value for a text box from a table containing only one row of data. On the property page for the text box I have the expression "=[Tablename]![Info]", where "Info" is the field that contain the value I want. The table is a linked table. When I run a question I get the answer I want

The problem is that when I open the form I get the text "#Name?" in the text box. The value I want is nowhere

What is the problem? Please help
 
R

Rick Brandt

ScubaD said:
I am trying to fetch a default value for a text box from a table
containing only one row of data. On the property page for the text box I
have the expression "=[Tablename]![Info]", where "Info" is the field that
contain the value I want. The table is a linked table. When I run a
question I get the answer I want.
The problem is that when I open the form I get the text "#Name?" in the
text box. The value I want is nowhere.
What is the problem? Please help

You can't just grab values out of tables with "=[Tablename]![Info]". You
need to use DLookup() or a Custom function to retrieve and return the
value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top