Full Version: default value in a form
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
danco
Good afternoon!
I have tried to enter a result from a query in the default of a form field . When the form is opened, I get the result "#Name?". Can anybody help me resolve this?
Thanks
Geoff
MattJ
How did you try to enter the result of a query in the default property? Did you just enter the query name?
Might want to use a DLookup statement instead.
danco
how would i enter that comand?
MattJ
=Dlookup("Field_Name","query_or_table_name","criteria_to_select_correct_value")
danco
thanks, i will give that a try
danco
i tried the dlookup command and get #error
ScottGem
What was the expression you used? And where did you put it?
danco
I have a form with a field called "odometer" and I used the following in the defaultvalue box

=DLookUp([Odom],"108odomqry")
danco
i got it figured out. Thanks to all who helped me with this problem.
Geoff
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.