Page 5 of 5 FirstFirst 12345
Results 61 to 68 of 68
  1. #61
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    I already changed the function name in the macro from RunCode Form Heading to Run Code Form Heading(). That worked.

    I am unfamiliar with a standard module but I assumed something like it exists.



    How to put code in Standard Module so it is accessible by all.

    Any help appreciated. Thanks in advance.

    Respectfully,

    Lou Reed

  2. #62
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    There are some thoughts here:

    http://www.baldyweb.com/Function.htm

    In the VBA editor, Insert/Module will create a new standard module. You can cut/paste your functions there if you want.

    Off to lunch!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #63
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    In the two pdf files attached show calls to Form Heading, but with this time arguments added. There is also another RunMacro command right below Form Heading about addmissingrows. Again the takes arguments.

    So how are they called in a macro?

    Any help appreciated. Thanks in advance.

    Respectfully,

    Lou Reed

  4. #64
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I don't use macros other than with automated applications to run code. Presumably

    FunctionName(123, "abc")
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #65
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    From Post #52
    Quote Originally Posted by Lou_Reed View Post
    Also, do you have an internet reference that explains the difference between function names and module names. It just seems confusing. I know the difference between file names and the names of subprograms in that file. I am assuming it is similar.
    As Paul said Modules are containers that hold procedures. There are two types of Modules: Class Modules which hold code that are behind Forms and Standard Modules which hold code that can be used anywhere.

    Got to this site
    http://www.accessmvp.com/strive4peac...Chapter_02.pdf
    Read page 2-1 down to TABLES, then Goto page 2-24 Start reading at MODULES to the last page of Chapter 2.

    Crystal's Access Basics are here
    http://www.accessmvp.com/strive4peace/Index.htm


    Crystal's full site is
    http://www.accessmvp.com/strive4peace/MyTools.htm

  6. #66
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    The following db gives an error when it is opened. I thought that I had it repaired, but I guess not.

    I have attached two pdf files for this. I am stumped as to why it is crashing.

    Any help appreciated. Thanks in advance.

    Respectfully,

    Lou Reed
    Attached Thumbnails Attached Thumbnails Capture10.PNG   Capture8.PNG  
    Attached Files Attached Files

  7. #67
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Okay, here is some more more info on this issue. I debugged the db i MS Access 2010. It works. When I moved it to MS Access 2016, it started to fail. It is odd that each time I open the db, I get a different error. If I close the db all the way and then repen it, I then the same sequence of errors that I git when I first I opened it. In other words if I close the db and open it again, the first error is always the same and so on.

    All i did was move the db from MS Access 10 to MS Access 2016.

    So what went wrong.

    Any help appreciated. Thanks in advance.

    Respectfully,

    Lou Reed

  8. #68
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    I want to put this post on hold for now. I am more interested in the other post that I made a few minutes ago.

    Respectfully,

    Lou Reed

Page 5 of 5 FirstFirst 12345
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Converting Macros To VBA in 2013 Office
    By data808 in forum Access
    Replies: 8
    Last Post: 06-17-2014, 02:37 AM
  2. Wizard - Create code Code vs. Macros?
    By runbear in forum Forms
    Replies: 3
    Last Post: 01-08-2014, 12:52 PM
  3. VBA code for macros
    By marcvanderpeet12 in forum Access
    Replies: 1
    Last Post: 10-31-2013, 06:24 AM
  4. Converting SQL to VBA code
    By Davidyam in forum Access
    Replies: 3
    Last Post: 04-18-2012, 10:29 AM
  5. Replies: 9
    Last Post: 01-11-2012, 01:29 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