#Name? prints on a report when date shows up on preview

F

flightoftheseabird

Access 2003 SP 2
Windows XP SP 2

I have created a report (rptFuelmanByForeman) that is based on a Query
(qryFuelmanByForeman). I have created a form to select (or enter) a
date range that then filters the report based on that date range and
populates transactions between those dates. I have created two text
boxes on the report that display the start date (txtStartDT) and end
date (txtEndDT) entered in the date select form. The control source
on the date boxes on the report is
"=Forms.frmFuelmanByForeman.txtEndDate" & "...txtStartDate". In
Preview mode, the dates display fine; however, when I print the report
the date fields show #Name?

In the query I have the TRANSDATE set with a criteria of "Between
[Forms].[frmFuelmanByForeman].[txtStartDate] And [Forms].
[frmFuelmanByForeman].[txtEndDate]" and I have a non-visible text box
on the form for TRANSDATE, but I don't really believe either of these
have anything to do with the dates not showing up when the report is
printed.

Any assistance is greatly appreciated.

Thanks,
Eric
 
K

Ken Snell \(MVP\)

Try changing the WHERE clause's criterion to this (use ! instead of .):

Between [Forms]![frmFuelmanByForeman]![txtStartDate] And
[Forms]![frmFuelmanByForeman]![txtEndDate]
 
K

Ken Snell \(MVP\)

Also, make the same change (replace . with !) in the textboxes'
ControlSource expressions.

--

Ken Snell
<MS ACCESS MVP>


Ken Snell (MVP) said:
Try changing the WHERE clause's criterion to this (use ! instead of .):

Between [Forms]![frmFuelmanByForeman]![txtStartDate] And
[Forms]![frmFuelmanByForeman]![txtEndDate]

--

Ken Snell
<MS ACCESS MVP>



Access 2003 SP 2
Windows XP SP 2

I have created a report (rptFuelmanByForeman) that is based on a Query
(qryFuelmanByForeman). I have created a form to select (or enter) a
date range that then filters the report based on that date range and
populates transactions between those dates. I have created two text
boxes on the report that display the start date (txtStartDT) and end
date (txtEndDT) entered in the date select form. The control source
on the date boxes on the report is
"=Forms.frmFuelmanByForeman.txtEndDate" & "...txtStartDate". In
Preview mode, the dates display fine; however, when I print the report
the date fields show #Name?

In the query I have the TRANSDATE set with a criteria of "Between
[Forms].[frmFuelmanByForeman].[txtStartDate] And [Forms].
[frmFuelmanByForeman].[txtEndDate]" and I have a non-visible text box
on the form for TRANSDATE, but I don't really believe either of these
have anything to do with the dates not showing up when the report is
printed.

Any assistance is greatly appreciated.

Thanks,
Eric
 
F

flightoftheseabird

Ok I did that, still not working. I did notice that I don't have a
WHERE clause in my query. It is a HAVING statement.

SELECT domEmployee.FirstName & " " & [LastName] AS CardholderName,
Sum(tblFuelman.AMOUNT) AS SumOfAMOUNT, domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE
FROM domMCCDesc INNER JOIN (domEmployee INNER JOIN tblFuelman ON
domEmployee.EmployeeID=tblFuelman.CARDHOLDER) ON
domMCCDesc.ID=tblFuelman.MCC_DESC
GROUP BY domEmployee.FirstName & " " & [LastName], domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE
HAVING (((tblFuelman.TRANSDATE) Between Forms!frmFuelmanByForeman!
txtStartDate And Forms!frmFuelmanByForeman!txtEndDate) And
((domEmployee.FirstName & " " & [LastName]) Not Like "keri*"));


Anything else I can try?




Also, make the same change (replace . with !) in the textboxes'
ControlSource expressions.

--

Ken Snell
<MS ACCESS MVP>

Ken Snell (MVP) said:
Try changing the WHERE clause's criterion to this (use ! instead of .):
Between [Forms]![frmFuelmanByForeman]![txtStartDate] And
[Forms]![frmFuelmanByForeman]![txtEndDate]

Ken Snell
<MS ACCESS MVP>
Access 2003 SP 2
Windows XP SP 2
I have created a report (rptFuelmanByForeman) that is based on a Query
(qryFuelmanByForeman). I have created a form to select (or enter) a
date range that then filters the report based on that date range and
populates transactions between those dates. I have created two text
boxes on the report that display the start date (txtStartDT) and end
date (txtEndDT) entered in the date select form. The control source
on the date boxes on the report is
"=Forms.frmFuelmanByForeman.txtEndDate" & "...txtStartDate". In
Preview mode, the dates display fine; however, when I print the report
the date fields show #Name?
In the query I have the TRANSDATE set with a criteria of "Between
[Forms].[frmFuelmanByForeman].[txtStartDate] And [Forms].
[frmFuelmanByForeman].[txtEndDate]" and I have a non-visible text box
on the form for TRANSDATE, but I don't really believe either of these
have anything to do with the dates not showing up when the report is
printed.
Any assistance is greatly appreciated.
Thanks,
Eric
 
K

Ken Snell \(MVP\)

What I do for reports in these circumstances is to add calculated fields to
the query for the parameter values, and bind textboxes on the report to
those calculated fields so that the values are more easily displayed on the
report -- too many problems, I've found, with having a report read from a
form that may not be open any more:

SELECT domEmployee.FirstName & " " & [LastName] AS CardholderName,
Sum(tblFuelman.AMOUNT) AS SumOfAMOUNT, domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE, Forms!frmFuelmanByForeman!txtStartDate
AS TheStartDate, Forms!frmFuelmanByForeman!txtEndDate
AS TheEndDate
FROM domMCCDesc INNER JOIN (domEmployee INNER JOIN tblFuelman ON
domEmployee.EmployeeID=tblFuelman.CARDHOLDER) ON
domMCCDesc.ID=tblFuelman.MCC_DESC
GROUP BY domEmployee.FirstName & " " & [LastName], domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE
HAVING (((tblFuelman.TRANSDATE) Between Forms!frmFuelmanByForeman!
txtStartDate And Forms!frmFuelmanByForeman!txtEndDate) And
((domEmployee.FirstName & " " & [LastName]) Not Like "keri*"));


--

Ken Snell
<MS ACCESS MVP>



Ok I did that, still not working. I did notice that I don't have a
WHERE clause in my query. It is a HAVING statement.

SELECT domEmployee.FirstName & " " & [LastName] AS CardholderName,
Sum(tblFuelman.AMOUNT) AS SumOfAMOUNT, domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE
FROM domMCCDesc INNER JOIN (domEmployee INNER JOIN tblFuelman ON
domEmployee.EmployeeID=tblFuelman.CARDHOLDER) ON
domMCCDesc.ID=tblFuelman.MCC_DESC
GROUP BY domEmployee.FirstName & " " & [LastName], domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE
HAVING (((tblFuelman.TRANSDATE) Between Forms!frmFuelmanByForeman!
txtStartDate And Forms!frmFuelmanByForeman!txtEndDate) And
((domEmployee.FirstName & " " & [LastName]) Not Like "keri*"));


Anything else I can try?




Also, make the same change (replace . with !) in the textboxes'
ControlSource expressions.

--

Ken Snell
<MS ACCESS MVP>

Try changing the WHERE clause's criterion to this (use ! instead of .):
Between [Forms]![frmFuelmanByForeman]![txtStartDate] And
[Forms]![frmFuelmanByForeman]![txtEndDate]

Ken Snell
<MS ACCESS MVP>
Access 2003 SP 2
Windows XP SP 2
I have created a report (rptFuelmanByForeman) that is based on a Query
(qryFuelmanByForeman). I have created a form to select (or enter) a
date range that then filters the report based on that date range and
populates transactions between those dates. I have created two text
boxes on the report that display the start date (txtStartDT) and end
date (txtEndDT) entered in the date select form. The control source
on the date boxes on the report is
"=Forms.frmFuelmanByForeman.txtEndDate" & "...txtStartDate". In
Preview mode, the dates display fine; however, when I print the report
the date fields show #Name?
In the query I have the TRANSDATE set with a criteria of "Between
[Forms].[frmFuelmanByForeman].[txtStartDate] And [Forms].
[frmFuelmanByForeman].[txtEndDate]" and I have a non-visible text box
on the form for TRANSDATE, but I don't really believe either of these
have anything to do with the dates not showing up when the report is
printed.
Any assistance is greatly appreciated.
Thanks,
Eric
 
G

Guest

Try this and in the report textbox use =[txtEndDate] & "..." &
[txtStartDate].
SELECT domEmployee.FirstName & " " & [LastName] AS CardholderName,
Sum(tblFuelman.AMOUNT) AS SumOfAMOUNT, domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE, Forms!frmFuelmanByForeman!txtStartDate AS
txtStartDate, Forms!frmFuelmanByForeman!txtEndDate AS txtEndDate
FROM domMCCDesc INNER JOIN (domEmployee INNER JOIN tblFuelman ON
domEmployee.EmployeeID=tblFuelman.CARDHOLDER) ON
domMCCDesc.ID=tblFuelman.MCC_DESC
GROUP BY domEmployee.FirstName & " " & [LastName], domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE
HAVING (((tblFuelman.TRANSDATE) Between Forms!frmFuelmanByForeman!
txtStartDate And Forms!frmFuelmanByForeman!txtEndDate) And
((domEmployee.FirstName & " " & [LastName]) Not Like "keri*"));



--
KARL DEWEY
Build a little - Test a little


Ok I did that, still not working. I did notice that I don't have a
WHERE clause in my query. It is a HAVING statement.

SELECT domEmployee.FirstName & " " & [LastName] AS CardholderName,
Sum(tblFuelman.AMOUNT) AS SumOfAMOUNT, domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE
FROM domMCCDesc INNER JOIN (domEmployee INNER JOIN tblFuelman ON
domEmployee.EmployeeID=tblFuelman.CARDHOLDER) ON
domMCCDesc.ID=tblFuelman.MCC_DESC
GROUP BY domEmployee.FirstName & " " & [LastName], domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE
HAVING (((tblFuelman.TRANSDATE) Between Forms!frmFuelmanByForeman!
txtStartDate And Forms!frmFuelmanByForeman!txtEndDate) And
((domEmployee.FirstName & " " & [LastName]) Not Like "keri*"));


Anything else I can try?




Also, make the same change (replace . with !) in the textboxes'
ControlSource expressions.

--

Ken Snell
<MS ACCESS MVP>

Ken Snell (MVP) said:
Try changing the WHERE clause's criterion to this (use ! instead of .):
Between [Forms]![frmFuelmanByForeman]![txtStartDate] And
[Forms]![frmFuelmanByForeman]![txtEndDate]

Ken Snell
<MS ACCESS MVP>
Access 2003 SP 2
Windows XP SP 2
I have created a report (rptFuelmanByForeman) that is based on a Query
(qryFuelmanByForeman). I have created a form to select (or enter) a
date range that then filters the report based on that date range and
populates transactions between those dates. I have created two text
boxes on the report that display the start date (txtStartDT) and end
date (txtEndDT) entered in the date select form. The control source
on the date boxes on the report is
"=Forms.frmFuelmanByForeman.txtEndDate" & "...txtStartDate". In
Preview mode, the dates display fine; however, when I print the report
the date fields show #Name?
In the query I have the TRANSDATE set with a criteria of "Between
[Forms].[frmFuelmanByForeman].[txtStartDate] And [Forms].
[frmFuelmanByForeman].[txtEndDate]" and I have a non-visible text box
on the form for TRANSDATE, but I don't really believe either of these
have anything to do with the dates not showing up when the report is
printed.
Any assistance is greatly appreciated.
Thanks,
Eric
 
F

flightoftheseabird

Nevermind about this last message. I figured it out.


Ok I did that, still not working. I did notice that I don't have a
WHERE clause in my query. It is a HAVING statement.

SELECT domEmployee.FirstName & " " & [LastName] AS CardholderName,
Sum(tblFuelman.AMOUNT) AS SumOfAMOUNT, domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE
FROM domMCCDesc INNER JOIN (domEmployee INNER JOIN tblFuelman ON
domEmployee.EmployeeID=tblFuelman.CARDHOLDER) ON
domMCCDesc.ID=tblFuelman.MCC_DESC
GROUP BY domEmployee.FirstName & " " & [LastName], domMCCDesc.MCCDESC,
tblFuelman.TRANSDATE
HAVING (((tblFuelman.TRANSDATE) Between Forms!frmFuelmanByForeman!
txtStartDate And Forms!frmFuelmanByForeman!txtEndDate) And
((domEmployee.FirstName & " " & [LastName]) Not Like "keri*"));

Anything else I can try?

Also, make the same change (replace . with !) in the textboxes'
ControlSource expressions.

Ken Snell
<MS ACCESS MVP>
Try changing the WHERE clause's criterion to this (use ! instead of .):
Between [Forms]![frmFuelmanByForeman]![txtStartDate] And
[Forms]![frmFuelmanByForeman]![txtEndDate]
--
Ken Snell
<MS ACCESS MVP>
Access 2003 SP 2
Windows XP SP 2
I have created a report (rptFuelmanByForeman) that is based on a Query
(qryFuelmanByForeman). I have created a form to select (or enter) a
date range that then filters the report based on that date range and
populates transactions between those dates. I have created two text
boxes on the report that display the start date (txtStartDT) and end
date (txtEndDT) entered in the date select form. The control source
on the date boxes on the report is
"=Forms.frmFuelmanByForeman.txtEndDate" & "...txtStartDate". In
Preview mode, the dates display fine; however, when I print the report
the date fields show #Name?
In the query I have the TRANSDATE set with a criteria of "Between
[Forms].[frmFuelmanByForeman].[txtStartDate] And [Forms].
[frmFuelmanByForeman].[txtEndDate]" and I have a non-visible text box
on the form for TRANSDATE, but I don't really believe either of these
have anything to do with the dates not showing up when the report is
printed.
Any assistance is greatly appreciated.
Thanks,
Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top