Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending report to email as a xcel file and incorrect information shows.

Status
Not open for further replies.

puforee

Technical User
Oct 6, 2006
741
US
In my DB I run code that loads a table. I have a Report that sends the data from the table. In VBA I am using DoCmd.SendObject to send the report as Excel to my users. It does not arrive the same. On Label is incorrect.

Troubleshooting by exporting the report from Print Preview to excel:

The issue: When I preview the report manually it shows 9 fields. The problem field is Labeled "End Date" in the preview and on the report in design view. The data portion of the field is formatted as a date and exports good. In print preview everything looks good. When I export to excel (or email as excel) the field label shows "Completion Status" instead of "End Date". The actual data part of the field shows the date correctly.

In the referenced table for the report there is NOT any field labeled "Completion Status". And the report in design view, does not have a label named Completion Status".

Do you have any ideas why this is happening? The data is good but the one label is not. There are 9 fields and all nine data-es look good and all labels except the one are good.
Also, with a report in Design View is there any way search for the offending label?

Thanks,

John
 
OK. I fixed this. I don't know why it was doing it but I created a new report using the same data from the same table. I ran the code to send it to me via email and everything looked good.
John
 
Sounds like corruption... Compact/Repair sometimes helps..
Sometimes importing all objects to a new file helps...
Sometimes exporting with the undocumented SaveAsText and loading with loadfromtext can fix an object... generally also import everything else to a file and load it there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top