Can't get any of my code to execute! (1 Viewer)

blacksaibot

Registered User.
Local time
Yesterday, 23:28
Joined
Jan 20, 2010
Messages
31
I'm simply trying to make a message box display when a user clicks on a button.

I go to the "On Click" section in the properties sheet.
I select Code Builder

I simply put msgbox("This is a test")

I save it

I open the form, I click the botton and NOTHING happens
What am I missing here? :confused::confused::confused::confused:
 

SOS

Registered Lunatic
Local time
Yesterday, 20:28
Joined
Aug 27, 2008
Messages
3,514
If you are in Access 2007 then you need to set the location of the database to be a trusted location. See here for more about that.
 

PKJ

Registered User.
Local time
Today, 08:58
Joined
Mar 7, 2010
Messages
29
If your database be Access-2007 - You may locate a bar below the Ribbon showing the message -

"certain content in the database has been disabled" and a button besides it giving you option to allow it. I hope it should do if your database location/path has not been declared 'trusted location' which you can set in "Access Options". Visit this link to know how to do it -

http://www.access-programmers.co.uk/forums/showthread.php?t=189817
 
Last edited:

smig

Registered User.
Local time
Today, 06:28
Joined
Nov 25, 2009
Messages
2,209
it should be either:
myMsgBox = msgbox("This is a test")

or:
msgbox "This is a test"
 

smig

Registered User.
Local time
Today, 06:28
Joined
Nov 25, 2009
Messages
2,209
This is the one. The other one is when you're testing for the value returned based on the user's response.
sure :)
Only wanted to give him both options
 

Users who are viewing this thread

Top Bottom