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
> Module Behind Button Won't Work, Access 2013    
 
   
briareu
post Nov 22 2017, 08:45 AM
Post#1



Posts: 16
Joined: 29-January 15



Hey guys,
I build a database to send mass emails in rapid succession.
I have one module "modSendSerialEmail" where looking into and excel spredsheet is taking the email addresses and fires emails in this module i am calling a second module "wait" to put a timer between the emails sent.
I made a form with a button to call modSendSerialEmail.SendSerialEmail.
Not sure if it has anything to do with the second module but the code gets stuck in the end.
When running the code from inside the first module everything works fine.

Thanks in advance
Go to the top of the page
 
Jeff B.
post Nov 22 2017, 09:09 AM
Post#2


UtterAccess VIP
Posts: 9,881
Joined: 30-April 10
From: Pacific NorthWet


Have you inserted a breakpoint or a Stop command in the code so you can single step through to see where this becomes an issue?

--------------------
Regards

Jeff Boyce
Microsoft Access MVP (2002-2015)

Mention of hardware or software is, in no way, an endorsement thereof. The FTC of the USA made this disclaimer necessary/possible.
Go to the top of the page
 
GroverParkGeorge
post Nov 22 2017, 10:16 AM
Post#3


UA Admin
Posts: 31,197
Joined: 20-June 02
From: Newcastle, WA


What does it mean to say "... but the code gets stuck in the end."

Use Jeff's suggestion to identify where the problem is and what error messages are raised.

Thanks.

--------------------
Go to the top of the page
 
briareu
post Dec 1 2017, 08:04 AM
Post#4



Posts: 16
Joined: 29-January 15



Hey guys,
Thank for the feedback.
I did added a break point and is working fine.
When I am using a form is not running (is like the form is missing something that the module has behind the scenes)
Go to the top of the page
 
GroverParkGeorge
post Dec 1 2017, 08:10 AM
Post#5


UA Admin
Posts: 31,197
Joined: 20-June 02
From: Newcastle, WA


On the one hand you say, "I did added a break point and is working fine. "

but then, you also say, "When I am using a form is not running ..."

So, is it working or not running?

I may be reading more into this than has been said, but it would appear that the code in question isn't actually being invoked from the click event behind that command button on the second form.


Show us the VBA for that Click event. Then we'll have a better idea where to look for the problem and solution.

Thanks.

--------------------
Go to the top of the page
 
briareu
post Dec 5 2017, 08:26 AM
Post#6



Posts: 16
Joined: 29-January 15



Hello ,
In the module is working in the form not.
this is how I am calling the module from the form

"Private Sub Macro_Run_Click()

Call modSendSerialEmail.SendSerialEmail

End Sub"
Go to the top of the page
 
GroverParkGeorge
post Dec 5 2017, 10:29 AM
Post#7


UA Admin
Posts: 31,197
Joined: 20-June 02
From: Newcastle, WA


You have a module named "modSendSerialEmail" and in that module you have a Public Function or a Public Sub named "SendSerialEmail". Correct?

If that's the case, there must be another problem in that form. Have you put the breakpoint in that button Click event to see if it's actually calling the send email function?
This post has been edited by GroverParkGeorge: Dec 5 2017, 10:30 AM

--------------------
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    12th December 2017 - 08:31 PM