p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 27th, 2004, 10:50 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: Frederick, MD, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Run Time Error

In the following function I have code that sends an email.
It worked initially but as I have added other things to
the dbs it now gives me the following error. When I hit
the debug button it goes to the first DoCmd Line.

Any help is appreciated
Thanks
Chris

Run-Time Error 2046
The Command or Action "Send Object" isn't available now.
*You may be in a read only database or an unconverted
databasefrom an earlier version of Mocrosoft Access
*The type of object the command applies to isn't currently
selected or isn't in the active window.

Use only yhe commands and macro actions that are currently
available for this database.




Function emailer1()
On Error GoTo emailer1_Err
If DCount("*", "Non_Special_Delivery") > 0 Then
  DoCmd.SendObject
acQuery, "Non_Special_Delivery", "MicrosoftExcel
(*.xls)", "Apperson Chris", "", "", "Test", "This is a
Test", False, ""
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "qryUpdate_Sent_Non_Special_Delivery",
acViewNormal
    DoCmd.SetWarnings True
    End If
emailer1_Exit:
    Exit Function

emailer1_Err:
    Resume emailer1_Exit

End Function

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 12:17 PM
run-time error(s) Chacko C++ Programming 0 March 4th, 2007 02:28 PM
Run-time error '2450' bmurrin Access VBA 6 May 31st, 2006 08:11 AM
run time error ashishroyk Java GUI 0 October 8th, 2004 02:42 AM
RUN-TIME ERROR compcad Beginning VB 6 2 May 21st, 2004 03:01 AM



All times are GMT -4. The time now is 02:15 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc