Good put Chaz. I found and implemented the same method and now I use it for all my Access / outlook emailing. You can also add .cc and .bcc, but I have not found a need yet. Here is my implementation of it:
Sub SendEmail(sSubject As String, sTo As String, sFrom As String, sMsg As String...
I finally made a couple minutes to go back through this when the folder ID changed and the program started sending out invalid emails. It is not that bad to loop through the folders. Here is what I ended up with:
Sub monitor_Incoming_Email()
Dim myNS As NameSpace
Set myNS =...
I think I mostly have it. The only thing that I am not super comfortable with is the Folder ID of the Folder in the PST:
Sub monitor_Email()
Dim myNS As NameSpace
Set myNS = Outlook.Application.GetNamespace("MAPI")
Dim oItem As Outlook.MailItem
Dim dMaxDateTime As Date
Dim inFolder As...
I receive emails every half hour to indicate that one of our servers is running. When the server goes down, it often goes unnoticed for hours and then we realize that we did not get the emails. I would like to write a module in access using vba so I can monitor the emails that get routed to a...
Here is a place to find how to add a record from vba:
http://www.functionx.com/vbaccess2003/howto/addrecord.htm
Here is a place that teaches you to add default fields w/ date & time functions:
http://databases.about.com/od/tutorials/ht/Access_2010_Timestamps.htm
Create a function called...
I would make sure that you do adequate testing. I have used the Do Events and found that it did not let one finish before the next started. That being said, I did/do turn warnings off so maybe that is the issue. I am not sure what good it would be to do a series of events with the warnings on as...
I would caution you on this. I have gotten mixed results when doing sequential queries via code like this because sometimes it seems that query #2 might start before #1 completes. I do not know if this is a perception or if you can just add do events in between the queries. Not sure if Access...
Thanks! I spent some time looking at this last night and here was what we came up with.
SELECT icwhseitem_0.whse,
icitem_0.vendnum,
icitem_0.itemnum,
icitem_0.description1,
icitem_0.description2,
icwhseitem_0.onhandqty...
I am trying to merge two pass thru queries. One is parts and part attributes, the other is calculating a rolling 12 months sum of sales.
Here is the code for the one summing the sales:
SELECT z.itemnum,
sum(case when z.yr = year(sysdate) and month(sysdate) >= 1 then z.actualusage_01 else...
Here is the code i am trying to wokr through.
All seems to work fine until I incorporated the iCi table.
I cannot figure out how to set up the joins in the right order.
Can anyone please help?
SELECT i.itemnum,
i.description1,
i.udindx3 AS...
I am a bit stuck on converting some local Access queries to real SQL as I am still learning SQL syntax. Can anyone assist? I butchered it pretty well below. Any assistance is greatly
appreciated. I am most stuck on going from Access "Iif" to SQL If.
SELECT TOP 120 w.loc...
For anybody that struggles to read the SQL that Access generates, here is a great website that will format your SQL for you:
http://www.dpriver.com/pp/sqlformat.htm
Hope this helps,
Nic
Thank you - the left join worked and all is well.
As it relates to the first method, the error was:
ODBC--call failed. Syntax error in SQL statement at or about "SELECT onhandqty fromdomdata.pub.icwhse" (10713) (#-210056)
I spoke too soon. The second method actually kind of worked, but only in the event where there is a matching record for the 'RTL' Whse . How can I get this to work even if the 'RTL' Whse does not have a record?
The first method still bombed with the same errors I was initially getting. The second method worked perfectly! Thank you so much - this will make a HUGE performance difference.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.