Results 1 to 7 of 7
  1. #1
    d9pierce1 is offline Expert
    Windows 10 Access 2019
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    828

    Parameter Value when closing a primary form?

    ProjectSample.zip

    Hi all,
    I have a parameter Issue I cannot solve. I have spent 4 days now on this trying to figure it out and have no idea why it is
    creating this error on closing the primary form? No Idea at all


    So with that, I have toned down a sample db and it will open to the form in question. (frmProject Holder)
    When I click the Permit Info Tab, then click the Permit Issuer or Permit Holder Tab and close the main form
    I get a parameter value ? Why I dont know... But it is truely driving me nuts! If I could get some assistance with
    it that would be great. I have tried making WHERE's in many different types and finally ended up putting in a query


    Attached to the list box and combo box in those forms.


    The function is once I select a Permit Issuer or Holder from the Combo, it populates the list box with the numbers associated.
    Then I can select from a different combo what contact I want associated with it and it populates the Phone and Email for the contact.


    All works great except for this anoying parameter value when I close the form
    If I am on Permit Doc's tab, form closes fine, just when on two of the other tabs I get the Parameter Value ?
    Please help!!!!


    Thank you,
    Dave

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Next time you provide a db, please either remove images from forms or provide the jpg's.

    Your "tabs" aren't tabs, they are command buttons. You are using a single subform container to load different forms (essentially emulating a Navigation Form). Apparently, something somewhere is referencing form that is no longer loaded. Either modify that code or first reload the missing form into container before closing form.
    Last edited by June7; 07-31-2024 at 07:32 PM.
    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
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,573
    And it tells you what it is looking for?

    I cannot even find just the word ScheduleID in the code?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    d9pierce1 is offline Expert
    Windows 10 Access 2019
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    828
    Hi Welsh
    Its not in code, its in a querry & Forms

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,573
    Well search for it there. I have no idea as to how all this is meant to work, so hard to debug.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,742
    This will avoid the errors. I have never seen VBA code with so many Me.Refresh lines.
    Commenting these may have unforseen consequences, but here you go...

    For sfrmProjectPermitIssuer
    Code:
    Private Sub Form_Current()
        On Error GoTo Error_Handler
    If Me.OnLineAccess = True Then
        Me.UserName.Enabled = True
        Me.Password.Enabled = True
        Me.Website.Enabled = True
    Else
        Me.UserName.Enabled = False
        Me.Password.Enabled = False
        Me.Website.Enabled = False
    End If
    ''''''''''''''Me.Refresh
    
    
    Error_Handler_Exit:
        On Error Resume Next
    For sfrmProjectPermitHolder

    Code:
    Private Sub Form_Current()
    
    
    '''''''''''''''Me.Refresh
    
    
    End Sub

  7. #7
    d9pierce1 is offline Expert
    Windows 10 Access 2019
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    828
    Thanks davegri
    I will give that a shot and let you know.
    dave

    Update
    Thanks for all the help!
    I found that the refresh was what was causing the problem but without the refresh,
    it wouldnt update the list box or combo so I took the error code and refresh out totaly
    and put in the primary subform for that subform when I click on the combo, it will call the button
    and that refreshes it and gives me the correct info!
    Again
    Thanks
    Dave - Marking as solved
    Last edited by d9pierce1; 08-01-2024 at 11:53 AM.

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

Similar Threads

  1. Closing a form
    By nevertool8 in forum Forms
    Replies: 3
    Last Post: 06-13-2019, 09:07 AM
  2. Closing a pop-up form?
    By drharb in forum Forms
    Replies: 3
    Last Post: 11-15-2016, 06:34 PM
  3. Closing a parameter form on Report Load
    By uaguy3005 in forum Reports
    Replies: 3
    Last Post: 01-12-2016, 01:23 PM
  4. Replies: 1
    Last Post: 02-28-2013, 01:20 PM
  5. Closing a form through VBA
    By ghostmachine in forum Forms
    Replies: 4
    Last Post: 12-13-2010, 01:57 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