Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6885901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:41:33+00:00 2026-05-27T05:41:33+00:00

Preface I have a need to create multiple copies of a search form (in

  • 0

Preface

I have a need to create multiple copies of a search form (in Access 2010) that returns a value to the calling (which is also the form that created the instance of the form).

As mentioned these forms could and will have multiple copies running at the same time for example a user could want to add a company to something so they:

  • Click “select company” and open an instance of the company search screen
  • Then open the company editor (leaving the original company search/selection screen open) as they notice the company has a parent company that hasn’t been added yet.
  • They then click the “Select Parent Company” button that opens ANOTHER instance of the search and select screen
  • They find the parent company
  • Select it which closes the second search screen and the parent company is added to the first company.
  • The user then selects the modified company using the original search screen which again closes the original search screen and returns the selected company to what ever form they originally initialised the first search…

This all allows the users to update and correct data as and when they find error which reduces the likelihood of them forgetting and makes it much quicker!

MOST of this is fine now but I have had a lot of problems with instances of a form not being able to open as a “acDialog” thus stopping the calling code running until the search was done (see this question for more info) and the solution I have gone with is to simulate the pausing of the calling code by using a endless loop and checking if the search screen instant is still visible. Then when the user selects something on the search screen instant it puts the value in a hidden field in the search screen and hides it’s self (not closed). The calling function then sees it’s hidden grabs the value from the hidden field and unloads the instant.

Problem

I can check if the form is hidden using FormInstant.Visable but if the user closes the form this causes an error and the code I would normally use to check if the form exists requires a form name and as it’s an instant of a form all the forms have the same name! I do have a reference to the form as it is stored in a local “form” object… The code I would normally use is:

CurrentProject.AllForms("FormName").IsLoaded

So how can I check for a instant of a form being loaded still?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:41:34+00:00Added an answer on May 27, 2026 at 5:41 am

    LOL I just realised while re-reading my msg that I can likely trap the error to work out if the form is open or not!

    I have quickly written this and it seems to work fine:

    Public Function IsFormLoaded(ByRef FormToTest As Form, _
                                Optional ByRef bIsVisable As Boolean = False) As Boolean
        Dim lErrorNum As Long
        bIsVisable = False
        On Error Resume Next
            bIsVisable = NewFormClone.Visible
            lErrorNum = Err.Number
        On Error GoTo 0
    
        If (lErrorNum = 0) Then
            IsFormLoaded = True
        Else
            IsFormLoaded = False
        End If
    End Function
    

    Guess it doesn’t really mater who answers the question as long as it is answered and the next guy/gal can use it! 🙂

    I will leave this open for a bit and if nobody finds a better answer I will mark this as it…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Preface: I have a MS Access 2010 front end running against a MySQL back
Preface I have a Access 2010 front-end with a MySQL back-end. I want to
Let me preface this by saying that I'm pretty new to Java. I have
I'll preface this question with the note that I have looked at this similar
I have the following XML example that I need some help on. The sample
I am trying to create a webpage that copies some text that it obtains
Alright as a preface I have a need to cache a relatively small subset
To preface we have a strange requirement that all dialogs must be modeless for
I'll need to preface this with the fact that I am a complete newbie
Preface: I have two entities defined as a one-to-many relationship: A <<-------> B. B's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.