Results 1 to 8 of 8
  1. #1
    JrMontgom is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2012
    Location
    Vero Beach, FL USA
    Posts
    124

    Question How to , when in Programming code, autoadd with special key a string to Event Code

    When I am debugging Code (Access 2010) is there a way to add a string, for example "Chg Jrm 6.1.2013 Reason: " The date in the string is todays date. I want to be able to use a speccial key code I.e. Alt 9 for example. Every time I make a change in the code I want to add a Comment string as shown able. I will type in the : Reason

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Look into this.
    I did not read it all.

    I did notice Doug Steele there, Doug has give me several helpful answers.

    Dale

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Dale, did you intend to reference a link in your post?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Why yes I did june7.


    http://social.msdn.microsoft.com/For...-f07a8a7af362/


    Thank you for catching that.


    Dale

  5. #5
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    You may be able to alter the technique used in
    https://www.accessforums.net/program...tes-35120.html

    It isn't clear to me in your post if the message is strictly for debugging, or for reference in future to any changes to code (and reasons).

    Good luck.

  6. #6
    JrMontgom is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2012
    Location
    Vero Beach, FL USA
    Posts
    124
    Quote Originally Posted by orange View Post
    You may be able to alter the technique used in
    https://www.accessforums.net/program...tes-35120.html

    It isn't clear to me in your post if the message is strictly for debugging, or for reference in future to any changes to code (and reasons).

    Good luck.
    Sorry I was so unclear in my request. While editing code in the Debugger I want to add to the code at the current cursor position a string in the format "Chg JRm 6/1/2013 <CRLF> Reason". I have no problem creating the string but how do I create a Hot key that will do this when I am in the debugging mode of MS Access 2010? For example I get a error message when running the code and realize I have used the wrong or incorrect variable and when I get back to the code in Debug mode I want to change the code then hit a Hot key to place the string message in the code.

  7. #7
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    My first thought is to create a string

    Debug.Print "Chg JRm 6/1/2013" & vbcrLf & "Reason:"

    Then Copy it( Cntl_C), and as you are debugging, get your cursor where you want it and hit paste or (Cntl_V)

    If you want the current date instead of 6/1/2013, then use

    Debug.Print "Chg JRm" & Date() & vbcrLf & "Reason:"

  8. #8
    JrMontgom is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2012
    Location
    Vero Beach, FL USA
    Posts
    124
    Thanks for the help. Sorry for the confusion but I realized I might be ablke to use MZ Tools which I have purchased and which I use all the time to insert common code segments i.e Opening ADODB etc. consider this solved.

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

Similar Threads

  1. Search for a String in VBA code.
    By dandoescode in forum Access
    Replies: 3
    Last Post: 06-21-2012, 11:00 AM
  2. Replies: 2
    Last Post: 04-13-2012, 06:57 AM
  3. AfterUpdate event code error?
    By agripa86 in forum Programming
    Replies: 3
    Last Post: 08-12-2011, 09:12 AM
  4. Replies: 1
    Last Post: 07-08-2011, 10:26 AM
  5. How to put code in form event.
    By rogdawg in forum Forms
    Replies: 4
    Last Post: 08-06-2010, 03:38 PM

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