#Name? Error

gcomp

Registered User.
Local time
Today, 15:29
Joined
May 28, 2010
Messages
45
I know this is something minor I'm overlooking, but it is driving me crazy. I have a report based on a query. CustomerName is entered and the address, city, state and zip are filled via a query tied to the CustomerData table. I run the query and the correct data appears. In the address field I have =[CustomerName].[Column](1), city field is =[CustomerName].[Column](2) and so forth. This exact same thing is working fine in another query. The address field is the second column, city field is the third and so forth. There are no spaces in any of the fields. Any suggestions for what is obviously something simple I need to correct?
 
Can you post the actual sql from the query or a screenshot
 
This is the query used to display the info. When I run the query everything shows as it should, but the report displays #Name? errors.

SELECT CustomerData.CompanyName, CustomerData.Address, CustomerData.City, CustomerData.StateProvince, CustomerData.ZIPPostalCode
FROM QuoteData INNER JOIN CustomerData ON QuoteData.CustomerName = CustomerData.CompanyName;
 
Try changing the name of your controls from CustomerName to cmbCustomerName (for example) and use that in the control source. See what happens.

So:

=[cmbCustomerName].[Column](1)
 
You haven't really changed anything on the screenshot. Where did you change the name?

NB: Please don't zip screenshots. Just post them as the are. For us it's too much hassle unzipping a folder just to see a screenshot.
 
I tried in the CustomerName field and when that didn't work, I tried the other fields one at a time. The reason I zipped the file is because the original exceeded the 100K limit.
 
In my post I mentioned renaming the control, not the field.
 
I renamed the control source on each if that is what you meant. Did you mean in the SQL or elsewhere?
 
A control is like a textbox, a combo box etc. Those are controls.

Anyway, I think you're approaching this the wrong way. Get those fields using your query. Don't use combo boxes to look up anything in your report.
 

Users who are viewing this thread

Back
Top Bottom