Sam Summers
Registered User.
- Local time
- Today, 23:00
- Joined
- Sep 17, 2001
- Messages
- 939
I have a report that is base on a query. I am attempting to print from a button on a form using the code:
stDocName = "ConformancyCertRpt"
DoCmd.OpenReport stDocName, acNormal
This report uses the following query:
SELECT Equipment.EquipmentID, Equipment.LocationID, Equipment.EquipRef, Equipment.ItemNo, Equipment.TestDate, Equipment.CertID, Equipment.Scrapped, Equipment.Lost, ConformancyCerts.CertNo, EquipLookup.EquipDescription, EquipLookup.ENNumber
FROM ConformancyCerts INNER JOIN (EquipLookup INNER JOIN Equipment ON EquipLookup.EquipRef = Equipment.EquipRef) ON ConformancyCerts.CertID = Equipment.CertID
WHERE (((Equipment.Scrapped)=False) AND ((Equipment.Lost)=False) AND ((ConformancyCerts.CertNo)=[Forms]![ViewbyConformancy]![CertNo].[Text]))
ORDER BY EquipLookup.EquipDescription;
Prior to all this, the original form is opened via a parameter form (FindConfAccess), using the code:
CertNumber.SetFocus
stDocName = "ViewbyConformancy"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "FindConfAccess"
Even though I can open the query and see the data and also preview the report, when I print the report it prints only the headings but no data?
I am on the virge of battering my computer to death!!!!!!!!!!
Many thanks if you can save the computer from going to the scrapyard!!!!
stDocName = "ConformancyCertRpt"
DoCmd.OpenReport stDocName, acNormal
This report uses the following query:
SELECT Equipment.EquipmentID, Equipment.LocationID, Equipment.EquipRef, Equipment.ItemNo, Equipment.TestDate, Equipment.CertID, Equipment.Scrapped, Equipment.Lost, ConformancyCerts.CertNo, EquipLookup.EquipDescription, EquipLookup.ENNumber
FROM ConformancyCerts INNER JOIN (EquipLookup INNER JOIN Equipment ON EquipLookup.EquipRef = Equipment.EquipRef) ON ConformancyCerts.CertID = Equipment.CertID
WHERE (((Equipment.Scrapped)=False) AND ((Equipment.Lost)=False) AND ((ConformancyCerts.CertNo)=[Forms]![ViewbyConformancy]![CertNo].[Text]))
ORDER BY EquipLookup.EquipDescription;
Prior to all this, the original form is opened via a parameter form (FindConfAccess), using the code:
CertNumber.SetFocus
stDocName = "ViewbyConformancy"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "FindConfAccess"
Even though I can open the query and see the data and also preview the report, when I print the report it prints only the headings but no data?
I am on the virge of battering my computer to death!!!!!!!!!!
Many thanks if you can save the computer from going to the scrapyard!!!!