Results 1 to 2 of 2
  1. #1
    David92595 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2012
    Posts
    22

    Trouble defining variables - Access Module

    Hello,



    I am having problems opening up a windows shell to a file path in a Module Function. I have it working as a sub, but am trying to convert to a module so it can be centrally located.

    I can get a basic explorer window to open
    RetVal = Shell("explorer.exe ")

    However, when I try to put in a file path with variables I start getting errors. I think my problem is defining the location of my variables. Particularly, LN (Loan Number) and Client_Name
    Here is my code:

    Code:
    Hello,
    
    I am having problems opening up a windows shell to a file path in a Module Function. I have it working as a sub, but am trying to convert to a module so it can be centrally located.
    
    I can get a basic explorer window to open
    RetVal = Shell("explorer.exe ")
    
    However, when I try to put in a file path with variables I start getting errors. I think my problem is defining the location of my variables. Particularly, LN (Loan Number) and Client_Name
    Here is my code:
    apath is a needed secondary variable. There are cases where I have to do some case specific changes to LN.

    As Always, any help would be greatly apprechated.
    Thank you,
    David92595

    P.S. would a Me.control work in a module?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You did not post code. Accidentally copied your narrative.

    Me is an alias for the form or report object the code is behind so no, will not work in a general module.
    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.

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

Similar Threads

  1. Defining an Array in an Access Table
    By EddieN1 in forum Database Design
    Replies: 9
    Last Post: 10-10-2014, 08:09 AM
  2. Replies: 3
    Last Post: 10-20-2012, 11:52 AM
  3. class module vs regular module
    By Madmax in forum Modules
    Replies: 1
    Last Post: 05-01-2012, 03:44 PM
  4. Replies: 10
    Last Post: 09-29-2011, 11:39 AM
  5. Replies: 4
    Last Post: 05-16-2011, 04:58 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