A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#name?



 
 
Thread Tools Display Modes
  #1  
Old September 15th, 2007, 02:32 AM posted to microsoft.public.access.queries
datahunter
external usenet poster
 
Posts: 25
Default #name?

I have a querie which i get a final total but when i try to set my querie as
the record source for my report or a textbox in my form, when i try to run my
report it a pop up box comes up asking for the values and not retreving them
from the querie.... and when i run my form it shows #name? in the box, any
ideas why and what will fix it? thanks everyone
  #2  
Old September 15th, 2007, 03:39 AM posted to microsoft.public.access.queries
Allen Browne
external usenet poster
 
Posts: 11,706
Default #name?

You have a Totals query as the source for your report.
This query includes criteria that reads from a text box, such as:
[Forms].[Form1].[Text0]
So you open the form, type in the value, and then run the report.
But the report pops up a parameter dialog asking for values?

Lots of things could be happening here, so let's take it one step at a time.

1. If you open the query itself, does it pop up the parameter box?

- No: Go to step 2.

- Yes: You may have misspelled a field name, or used a reserved word, or you
may trying to refer to a field that is not in the final output (e.g. one
that was in the WHERE clause but not the GROUP BY field.) Post the SQL
statement for your query if you get stuck here.

2. If the query works correctly, let's go go the report. Write down the
names Access doesn't understand. (These are the ones it pops up the
parameter box for.) Are these actually in the query results? That is, when
you view the data for your query, do you see a column with this name?

- No: The report cannot display data that is not in its source query.
Either add the field to the query, or remove it from the report.

- Yes: Add a text box to your report for these fields.
You can set their Visible property to No if you wish, but if they are not on
the report, Access tries to be too smart and doesn't always bother to fetch
them.

There are some less obvious places to look if you want to remove these from
your report. That includes the Sorting And Grouping dialog (View menu), the
Filter and Order By properties of the report, and the Control Source of
controls (even those that use expressions.)

Also, the form must remain open: it won't work if you close the form while
the report is still open.

3. If the form has problems anyway (showing #name), this could cause the
query and report to jam up too since they rely on the form for their
criteria. The #name could be many things. Typically a control is bound to a
non-existent field, or to an expression that refers to somehing
non-existent, or it has a name that is the same as a field but is bound to
something different.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"datahunter" wrote in message
...
I have a querie which i get a final total but when i try to set my querie
as
the record source for my report or a textbox in my form, when i try to run
my
report it a pop up box comes up asking for the values and not retreving
them
from the querie.... and when i run my form it shows #name? in the box,
any
ideas why and what will fix it? thanks everyone


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:40 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.