Results 1 to 8 of 8
  1. #1
    mikichi is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Oct 2013
    Posts
    45

    vba code dont work

    hi,
    i try to write code in current Event but the Access 2007 dont start him when i click.
    i dont get any error, and in new project its work perfect! its frick me out
    Code:
    private sub btn_click()
    msg box(1)
    end sub
    thank you,
    miki

  2. #2
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    try

    msgbox(1)

    It will pop a window with 1 in it. Hope this helps.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Maybe, instead of creating multiple threads, you can try to explain what you are trying to accomplish.
    https://www.accessforums.net/access/...tml#post197922
    Are you trying to hide a control on your form when a condition is met? Are you trying to test a Message Box? If this thread is about a Message box, maybe you can state this here.

    The different events handlers are to handle different actions the user might perform. A click event will only fire when the user clicks a specific control. It will not automatically call another procedure like a load event or current event.

  4. #4
    mikichi is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Oct 2013
    Posts
    45
    Quote Originally Posted by ItsMe View Post
    Maybe, instead of creating multiple threads, you can try to explain what you are trying to accomplish.
    https://www.accessforums.net/access/...tml#post197922
    Are you trying to hide a control on your form when a condition is met? Are you trying to test a Message Box? If this thread is about a Message box, maybe you can state this here.

    The different events handlers are to handle different actions the user might perform. A click event will only fire when the user clicks a specific control. It will not automatically call another procedure like a load event or current event.
    first, i open a thread here too because i think that question is less specific. i explain.
    i cant to run a code in one project, and the same code exectly work to me in other project.
    i now to programming and i understand how the thing need to be. im new in access not in programming.
    maybe access have a option that block the code?
    thank you very much
    miki

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Not quite sure what the question is still. That is Why I mentioned,
    "The different events handlers are to handle different actions the user might perform. A click event will only fire when the user clicks a specific control. It will not automatically call another procedure like a load event or current event."

    Perhaps the answer to this thread is on post # 2

  6. #6
    mikichi is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Oct 2013
    Posts
    45
    Quote Originally Posted by ItsMe View Post
    Not quite sure what the question is still. That is Why I mentioned,
    "The different events handlers are to handle different actions the user might perform. A click event will only fire when the user clicks a specific control. It will not automatically call another procedure like a load event or current event."

    Perhaps the answer to this thread is on post # 2
    no, i explain,
    if i write the code in new project i get a msg box, but if i write the same code in my project i got nothing.

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Did you try the suggestion in post #2?

  8. #8
    mikichi is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Oct 2013
    Posts
    45
    Quote Originally Posted by ItsMe View Post
    Did you try the suggestion in post #2?
    i solved it!!

    the problem was what i think it was.
    my folder, when i save the project was UnTrussted folder - i.e i dont add her.

    thank youuuu mannn!!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. UNION qry dont work as expected.
    By rncarterjm in forum Queries
    Replies: 10
    Last Post: 04-02-2013, 07:53 AM
  2. VBA code used to work now it does not
    By rachello89 in forum Programming
    Replies: 9
    Last Post: 06-15-2012, 08:48 AM
  3. Replies: 1
    Last Post: 03-07-2012, 02:00 PM
  4. macros in subform dont work
    By tuyo in forum Access
    Replies: 2
    Last Post: 03-25-2011, 09:49 AM
  5. Criteria from Combobox dont work.
    By Ryan in forum Queries
    Replies: 3
    Last Post: 08-31-2009, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums