Crosstab #Name? Problem

razorking

Registered User.
Local time
Today, 11:41
Joined
Aug 27, 2004
Messages
332
OK, been awhile since I posted anything here. I have a weird one, hope there is a solution.

I have a form that uses a crosstab query for it's data. The problem is the crosstab query has a column heading that (in my example) represents warehouses of which there are ten. So when the form was originally created it had ten text boxes for quantity values by product for each warehouse. The problem is depending on when the query is ran there will be times when there are no values for one or more warehouses, when this happens the crosstab query does not show those warehouses at all as column headings, therefore the text boxes on the form do not have a corresponding field on the query and, because of that it displays the - #Name? in the text box.:mad:

How would one go about dealing with this situation??

Thanks!
 
You can add an IN clause to force the crosstab query to display all the warehouses.

TRANSFORM ...........
SELECT .............
FROM [tableName]
GROUP BY ............
PIVOT ........... IN ("warehouse1","warehouse2",.....,"warehouse10");
.
 
I See

Ah, it appears you are correct.

You are a genius my friend.

Thank You!
 

Users who are viewing this thread

Back
Top Bottom