Solved

Using Send Object in Access

Posted on 2011-02-24
5
370 Views
Last Modified: 2012-05-11
Hi Experts,

i am using the send object action to convert a query into excel and send it via email. But now i have to add a few more line as headers in the excel spreadsheet that is being sent.

Could you please let me know how to add notes in the spreadsheet before its being sent.

Thanks,
Sai.
0
Comment
Question by:Saichand
  • 2
  • 2
5 Comments
 
LVL 30

Expert Comment

by:hnasr
ID: 34975412
Try this:
Table a(f1, f2, f3, aid)

Add the notes in the query and continue your work.

Select f1, f2, f3, aid from a
UNION
Select top 1 "note1", "note2", "note3", "note4" from a
0
 

Author Comment

by:Saichand
ID: 34989025
can you please show how you are doing iit n a access database?

i have attached a excel template where the output from the query should be added in line 4
test.xls
0
 
LVL 21
ID: 34989813
Since you are using SendObject this limits what you can do a lot.

hnasr's suggestion is using a Union query to add data to you current query. The idea si the you wuill add uyour comments as reco9ds in teh query,. This wil allow you to continue to use teh SendObject method.

 If the comments must go into specific cells in the worksheet then  you will probably want to use Excel automation. You could collect the additional information in Access then export all the data to the Excel file.

See: Export to Excel

0
 

Author Comment

by:Saichand
ID: 34993342
thanks a lot will let you know if i have any questions
0
 
LVL 30

Accepted Solution

by:
hnasr earned 500 total points
ID: 34993733
I assumed that you allready using sendobject to send the query to excel.

Assume the query is toExcel_q. Query sql:
Select f1, f2, f3, aid from a

Now you add few lines and then email.

The idea is to add the notes to the query, then sendobject the query to excel.
The query toExcel_q's sql is:

Select f1, f2, f3, aid from a
UNION
Select top 1 "note11", "note12", "note13", "note14" from a
UNION
Select top 1 "note21", "note22", "note23", "note24" from a  

I did not check Saichand's comment. Try it.

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now