Run a macro after If statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm having trouble running a macro after the Else part of an If statement.

Private Sub fedprovpre_Click()

Dim stDocName As String

If IsNull(Me![cbo_IDPrint]) Then
MsgBox "Choose Entity and Period from dropdown box!", , "Wait a
second!!!"
Else

stDocName = "mcr_4a Preview Federal Provision"
DoCmd.RunMacro stDocName

End If

End Sub

What am I doing wrong here??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Msgbox and DoCmd 1
Macro question?? 4
variable not defined error 2
If Statements 2
MAYDAY! MADAY! - Run time error 7
If...Then...Else Help 2
Open Report Cancelled 1
Like '*' or Is Null 4

Back
Top