Results 1 to 7 of 7
  1. #1
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234

    Getting missing value error when I try to close a form

    Long story short, I have one form called PPADataOnly. It is related to frmClient. Out of no where, when I select the "close all" command button, I'm getting a popup saying that paramater value for Forms!frmClient!txtClientID is missing, asking me to fill it in.



    Here's the code for the close all command button:
    Private Sub cmCloseAll_Click()Dim db As Database
    Dim frm As Form
    Dim intX As Integer




    Do While Forms.Count > 0
    DoCmd.Close acForm, Forms(0).Name
    Loop


    DoCmd.OpenForm "frmMainSwitch"
    End Sub

    This is the popup box I'm getting.

    Click image for larger version. 

Name:	parameter value.png 
Views:	18 
Size:	13.2 KB 
ID:	21633

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Either your txtBox is spelled wrong
    or
    the form name is spelled wrong
    or
    form is not open.

  3. #3
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    I just figured out the exact circumstances: When frmClient is open and on a record, and I then open up a PPA form and hit close all, then I get the error. If frmClient is NOT open, and I have a PPA open, I get no error when I hit "close all".

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Are you using dynamic parameterized query as form RecordSource?

    I NEVER use them for anything.

    Which form is that code behind?

    Interesting, would have expected the opposite behavior.
    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.

  5. #5
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    The code is behind frmPPA_DataOnly.

    I don't think that I'm using dynamic parameterized query as form Record Source. The RecordSource is "SELECT * FROM tblTempPPA_DataOnly ORDER BY DateTimeLastAccess DESC, CompanyName, ClientName, EventDate;"

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Something somewhere is referencing that form control when it is not available. If you want to provide db for analysis ...
    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.

  7. #7
    bradp1979 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Location
    San Francisco, CA
    Posts
    234
    This got even weirder. So I started over with an older FE to figure out which of the additions I made was creating the error, and I found it. I have a list box that shows all the events that a particular client has booked with us. I wanted to do a simple count of the events in the list box. The list box is called lboEvent, so I placed a text box beneath it, and inside, I had

    "=lboEvent.listcount".

    That's what caused the missing parameter popup. I deleted it, and the popup hasn't resurfaced.

    I don't get it, the expression in the text box I placed doesn't reference the ClientID at all, but there it is.

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

Similar Threads

  1. Replies: 6
    Last Post: 06-05-2015, 04:02 PM
  2. Replies: 4
    Last Post: 01-20-2013, 06:34 PM
  3. Replies: 6
    Last Post: 04-13-2011, 03:55 PM
  4. Replies: 2
    Last Post: 03-14-2011, 03:42 PM
  5. Access Form- Save/Close Button error
    By Ashe in forum Forms
    Replies: 3
    Last Post: 02-10-2011, 01:01 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