Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930

    The VBA procedure should be a Sub and the parameter must be concatenated outside quote marks like shown in original post. The converted code is button click event not listbox click as in original post. Converted code references field not listbox as parameter.
    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.

  2. #17
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    I don't know what a trusted location is
    I suspect that's the reason that my DB, Your DB and any DB that you create or try to use in the future will not work with VBA.
    Have a look at this:
    https://support.office.com/en-us/art...3-4e7c67147fb4

  3. #18
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    this

    Function cmdTestListClick()


    should

    a) be in the form module
    b) should look like Private Sub cmdTestList_Click()

    the fact it doesn't implies you have created the macro as a general macro and not one directly connected to the control

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 07-28-2017, 12:12 PM
  2. Replies: 7
    Last Post: 06-02-2017, 10:40 AM
  3. Replies: 3
    Last Post: 07-12-2016, 08:10 AM
  4. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  5. Replies: 3
    Last Post: 01-27-2015, 12:25 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