I am trying to use the AutoExec command as I started learning Visual Basic last week and I wish a Microsoft Access Database to display a pop up messagebox when it loads. So I have written the following code and stuck it in a module:
Public Sub AutoExec()
Dim MyVal As String
MyVal = "Hello Karen"
MsgBox MyVal
End Sub
But nothing happens when I open the Database and I can't figure out why. Can anyone help the noob? Or if someone could just post a simple bit of code that works with the AutoExec command so I can experiment with it that would be great also.
Thanks.
Public Sub AutoExec()
Dim MyVal As String
MyVal = "Hello Karen"
MsgBox MyVal
End Sub
But nothing happens when I open the Database and I can't figure out why. Can anyone help the noob? Or if someone could just post a simple bit of code that works with the AutoExec command so I can experiment with it that would be great also.
Thanks.