473,382 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

send query in xls format by email --- sendobject

Hi, there,

I have a form with 2 email buttons both with docmd.sendobject code.
The 1st one send a report which is working properly. The 2nd one send
a query in xls format which is always get an error message say" ....
can't save the output data to the file you selected." I am very
confused. it used to work properly. And now, sometimes it works, most
time it doesn't work.

I am using ACC2000, outlook express and Win XP. below are the 2 email
buttons' code:
'------------------------------------
Private Sub cmdEmail_Click()
Dim strToWhom As String
Dim strMsgBody As String
Dim intSeeOutlook As Integer

intSeeOutlook = MsgBox("Preview e-mail message?", _
vbYesNo, "RFQ " & Me.Caption)

If intSeeOutlook = vbNo Then
strToWhom = InputBox("Enter recipient's e-mail address.", _
"EMAIL Address")
intSeeOutlook = False
End If

DoCmd.SendObject acSendReport, "RFQ", "snapshot format", _
strToWhom, , , "RFQ " & Me.Caption, _
"Here is our RFQ", intSeeOutlook

End Sub

'---------------------------------------

Private Sub email2_Click()
On Error GoTo Err_email_Click
DoCmd.SendObject acSendQuery, "Email_RFQ_table", acFormatXLS, _
"ho*@meus.mea.com", , , "QDI " & Me.Caption, _
"Here is our QDI Data", , False
Exit_email_Click:
Exit Sub

Err_email_Click:
MsgBox Err.Description
Resume Exit_email_Click
End Sub
'-------------------------------
the "Email_RFQ_table" query is :
SELECT Bid_RFQ.*
FROM Bid_RFQ
WHERE (((Bid_RFQ.ID)=[forms]![rfq]![rfqid]));

also, bid_rfq is a query. So the "Email_RFQ_table" query is based on
another query. The 2 buttons are on the form called "RFQ".

Thanks alot. pls help me..
Nov 12 '05 #1
0 1869

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: MLH | last post by:
I want to send 2 reports using SendObject. Something like this would do nicely... DoCmd SendObject A_REPORT, "rpt1";"rpt2", A_FORMATRTF, MyRecip, , , MySubject, MyBodyText, 0 ....except for...
2
by: Steve Bishop | last post by:
I have an application that sends a query by e-mail in Excel format using a DoCmd.SendObject statement in VBA. I need to delete the column headings now before I send it. Help appreciated. Thanks....
4
by: Ranganath Udupa | last post by:
I need to include a mail to a concerned person whenever a button is clicked in an Access form. So I used the DoCmd.SendObject command. However, it seems like I cannot send a long message text. Is...
17
by: DP | last post by:
hi, is there a way to send an e-mail to a customer, using ms access?? or some kind of automated mail merge, so the user only has to review the body, and click send? ive got a customer table,...
1
by: noel.tock | last post by:
Hi all, Thank you already for the amount of information that has collected in this group, very helpful indeed. I have a question in regards to setting up individual emails to be sent based on a...
2
by: Les | last post by:
Hi all, i am not a programmer but a dabbler, i need to do the following.... The user must enter on a form a monetry amount, a project number and his name. I would like him to then click on a...
1
by: bamrak | last post by:
I seem to have gotten over my head, but this seems fairly straightforward.. I have a table of items assigned to a rep, and I have a rep list table created from the original table ( to show only...
5
by: pat | last post by:
Hi, i'am using an ac2K progrom which sends automaticle emails with an attachment. Since last week , a error occurs with number 2293. Our mail program is Outlook 2003. It's probably a matter...
2
iBasho
by: iBasho | last post by:
Hi, I am trying to set up a notification email that would come to my email everytime users click on a command button in a form. I am using the DoCmd.SendObject command without actually sending any...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.