UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Requery Open Form After Sending Email, Any Version    
 
   
mdcory
post Sep 13 2019, 02:50 PM
Post#1



Posts: 44
Joined: 21-August 04



Long story short. I am inserting a record to a table in Access after an email is sent. Using RegEx to look for a number in all emails sent. This all works great. I have a form that will be open in Access when the email is sent. I would like to have this form requeried when an email that matches is sent. Can someone point me in the right direction, please? If I can just get help getting from Outlook to the form in Access via VBA I should be able to work it out from there.

Thanks,
Matt
Go to the top of the page
 
theDBguy
post Sep 13 2019, 06:24 PM
Post#2


Access Wiki and Forums Moderator
Posts: 76,408
Joined: 19-June 07
From: SunnySandyEggo


Hi Matt. How exactly are you sending the email? Are you initiating the email from Access or not?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
mdcory
post Sep 16 2019, 08:06 AM
Post#3



Posts: 44
Joined: 21-August 04



Yes, I am. I am passing attachments to Outlook then regular user interaction with Outlook ie: adding recipient, subject and body.
Go to the top of the page
 
theDBguy
post Sep 16 2019, 10:51 AM
Post#4


Access Wiki and Forums Moderator
Posts: 76,408
Joined: 19-June 07
From: SunnySandyEggo


Then, on your form where you initiate the email, just add a requery after it.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
mdcory
post Sep 16 2019, 11:15 AM
Post#5



Posts: 44
Joined: 21-August 04



I need it to requery after the email has been sent and the record has been inserted. I am using vba in Outlook to save the email to a network drive and insert the recipient, sender, subject, date and time and file location into a table displayed on a form that needs to refresh after the email is sent.
Go to the top of the page
 
theDBguy
post Sep 16 2019, 11:23 AM
Post#6


Access Wiki and Forums Moderator
Posts: 76,408
Joined: 19-June 07
From: SunnySandyEggo


So, if you're using Outlook VBA and the form is still open, maybe you can also refresh/requery the form using Outlook VBA. If not, the next best thing is to use a Timer event on your form.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
mdcory
post Sep 16 2019, 11:51 AM
Post#7



Posts: 44
Joined: 21-August 04



That's what I am wanting to do but not sure how to reference the open form in Access from Outlook and all my searching all I am finding is referencing from like a main form to sub form and vice versa.
Go to the top of the page
 
theDBguy
post Sep 16 2019, 11:53 AM
Post#8


Access Wiki and Forums Moderator
Posts: 76,408
Joined: 19-June 07
From: SunnySandyEggo


So, from Outlook, you could try creating an instance of the Access database and try to requery the open form. If it doesn't work, maybe try using a form timer first.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    20th October 2019 - 09:33 PM