Results 1 to 5 of 5
  1. #1
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171

    Angry Can't Get Macro to Run w/o Parameters Requested

    I put a button on my Client form so when I clicked on the "Activity" button it would pull the Activity form for that specific client. I did that by creating a macro telling the button to pull that activity form based upon the same contract number in the client form. The problem I have is that when I run the Macro it asks for two parameters that I used to have in a query for contract number and name. I have deleted the parameter criteria from that query and every area I can think of and the macro still requests it. If I click through each parameter request I get the activity form I desire, but I don't want the parameter requests which must be hiding somewhere! Just can't find them. Here is my macro which is working just as I want it to in another DB:



    In the Where Condition= [Contract#]=[Forms]![Client]![Contract#]

    PS This is a form with a sub form.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Don't see anything wrong with the code. If you want to provide db for analysis, follow instructions at bottom of my post.

    Advise not use spaces nor punctuation/special characters (underscore only exception) in naming convention - better would be ContractNum.
    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.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I have deleted the parameter criteria from that query and every area I can think of
    Not sure where else parameter criteria could be located other than a query or code that creates a sql statement. Did you ensure there are no controls on the form(s) whose fields are no longer in the query?
    Or maybe one form has a calculated control that uses a field that is no longer part of the query? Note that the subform opens first, then the main form, so you might want to try single step on the macro to see which form is driving the prompts.
    If "Client" is the subform, the reference doesn't look right to me.
    Not good practice to use special characters (#) in object/field names (save for the underscore).
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Thanks to both of you. Apparently, I had not looked everywhere for the query supporting the form but I found the query with the parameters set this morning. Once removed, worked just as I wanted it to. Thanks again!!

  5. #5
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Glad to have helped in some small way. Good luck with your project.

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

Similar Threads

  1. Replies: 1
    Last Post: 07-07-2014, 09:32 AM
  2. VBA Help Requested
    By aamer in forum Access
    Replies: 1
    Last Post: 06-08-2014, 08:51 AM
  3. Replies: 1
    Last Post: 01-16-2013, 10:58 AM
  4. 2010 Data Macro weirdness with Parameters
    By mkenyon2 in forum Programming
    Replies: 3
    Last Post: 10-09-2012, 10:12 AM
  5. Form to enter all parameters in a macro
    By jackthedog in forum Access
    Replies: 0
    Last Post: 05-05-2009, 04:47 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