Report blank field problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am reporting a field in a report from a query that is sometimes blank. How
do I either get the data filled into that record or retrieve th data from
another query? I am using this to report the dealer name in the header of
the report. Thanks!
 
Why would the dealer name be blank and if it was, what value would you want
to display?

Your answer might be to use the Nz() function.
 
Thanks for the response.

I am using a couple of queries and if there is no data in one of the
queries, the dealer name doesn't get reported for those records. Is there a
way to force that delaer name to be palced in those records?
 
More clarification. Since I'm using the field to report in the header it is
only when the field in the first record is blank that I have a problem.
 
I still don't know why the field doesn't show. Is this a matter of reporting
records where the particular dealer doesn't have and "deals" in the reported
records?
 
That is correct. It is a one to many relationship and the report works fine
as long as the "dealer" has data in the first record. If they don't then the
field is blank and I need to put something there. I've tried changing from
the query and using Dlookup to get a value from another query but I can't get
that to work either. Thanks for listening!
 
If the dealer doesn't have any deals in the report then why do you want to
see their name?
 
I am lost as to your table structures, data values, and report record
sources. Can you explain some of this as well as why dealer information is
stored only in a first deal?
 
This is sales report that reports sales by dealer by stock class. I have a
data table with current data and a table that lists all stock classes to be
reported. By using a one to many relationship from the all stock classes
table to the data table I can report not only what stock classes the dealer
had sales in but also any where they didn't have sales. The report sorts by
stock class. In this case the dealer had no sales in the first stock class
listed so the "dealer" field is blank. Thanks for the help.
 
Is this report generated for only one dealer? If not, how would you
determine which dealer to print in your report?
 
Yes, the report is run for just one dealer at a time using a criteria
selection in a sub query.
 
You should be able to get the dealer name to your report in the same way
that you get the criteria to your query.
 
Duane, Thanks again for the help.

You would think that the dealer name would be there, but in this case the
first stock class in the sort order comes from the stock class table that
lists all stock classes and has the one to many relationship to the data
table. As long as the dealer has sales data for this first stock class then
the report works fine. If the dealer doesn't have any sales in that stock
class then it comes from the stock class data table and then the dealer code
is lost for that record.
 
You stated "the report is run for just one dealer at a time using a
criteria". Where is the criteria coming from? This is what I was getting at
in my previous reply.
 
Dealer is selected in an earlier sub query.

Duane Hookom said:
You stated "the report is run for just one dealer at a time using a
criteria". Where is the criteria coming from? This is what I was getting at
in my previous reply.
 
Ahh!!! Finally. I moved the selection criteria to a the last query and that
fixed it!!! Thanks for the help!!
 
Back
Top