Solved "You Called This Sub" (1 Viewer)

Eljefegeneo

Still trying to learn
Local time
Yesterday, 18:23
Joined
Jan 10, 2011
Messages
904
I wrote the following code for my Access 2010 program:and it worked like a charm.
Code:
Dim DayVal As Long
DayVal = Weekday(Date, 1) 'Set first Day of Week, in this case Sunday.
If (DayVal = 6 And Hour(Now) > 15) Then
Call cmdZipAndEmail_Click
End

And when I transferred it to Access 2019 I get the following pop-up message box:

"You called this sub"

Don't want this - what is going on and how do I get rid of it?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:23
Joined
Oct 29, 2018
Messages
21,453
Hi. Which line is highlighted when you go to debug?
 

June7

AWF VIP
Local time
Yesterday, 17:23
Joined
Mar 9, 2014
Messages
5,465
How could that code work? There is no End If line. If you don't want End If then put the Call line on same line as If Then.
 

Eljefegeneo

Still trying to learn
Local time
Yesterday, 18:23
Joined
Jan 10, 2011
Messages
904
OK, it should have read the last line End if.

And the code is not highlighted, the message box just pops up.
 

Eljefegeneo

Still trying to learn
Local time
Yesterday, 18:23
Joined
Jan 10, 2011
Messages
904
some Days I am just brain dead. Sorry for the post. Figured it out. I had inavertantly left in some code that triggered an error message that set off this pop up. Shame on me.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:23
Joined
Oct 29, 2018
Messages
21,453
some Days I am just brain dead. Sorry for the post. Figured it out. I had inavertantly left in some code that triggered an error message that set off this pop up. Shame on me.
Hi. Glad to hear you got it sorted out. Good luck!
 

Users who are viewing this thread

Top Bottom