#Name? linking a query result in a text box.

dynamite9585

Registered User.
Local time
Tomorrow, 02:27
Joined
Jul 4, 2010
Messages
34
I have a query that takes data from 2 tables.
one of the results from the query is:

Paradecount: Sum(IIf([Onparade]=True,1,0))

i then want to put the result onto a form using:

=[AttandacetrackerQuery]![Paradecount]

have also tried Dlookup. i keep getting #Name?

access 2007
 
If that query/field isn't part of the form's record source, you can't refer to it that way. The DLookup would be the most likely method to get a value from an unrelated query. What exactly did you try that produced the error?
 
Sorry, but that is a common mistake. You can't do it that way. You need to use a DLookup -

=DLookup("ParadeCount", "AttandacetrackerQuery")

Make sure that your text box is not named ParadeCount AttandacetrackerQuery (I would hope that you might correct that spelling error - AttendanceTrackerQuery would be spelled correctly).
 

Users who are viewing this thread

Back
Top Bottom