473,320 Members | 1,993 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Why does modal form remains visible?

6
I'm stumped, I have a form with its pop up/modal properties both set to "yes", this form is opened in response to a "Search" command button on the primary form (DoCmd.OpenForm "frmSearch"); after all code executes within the Search form it is coded to close without save (DoCmd.Close acForm, "frmSearch", acSaveNo) the primary form remains loaded in the background througout. Here is the problem, the search form closes sometimes and then at other times remains open as a "ghost" image (cannot be interacted with), I have to go to task manager to kill the MSAccess process to get rid of it. Any help would be appreciated in figuring out why this form will not close; I've ensured that all record sets are set to nothing as this was in other posts as a possible reason.
May 18 '10 #1
9 2480
Jim Doherty
897 Expert 512MB
@DCon
Have you got any Application.Echo or DoCmd.Echo commands set to False not set back to True at any material time?
May 18 '10 #2
DCon
6
@Jim Doherty
No Application.Echo or DoCmd.Echo commands used anywhere within the code.
May 19 '10 #3
missinglinq
3,532 Expert 2GB
I suppose you could try making the form invisible then closing it:

Forms("frmSearch").Visible = False
DoCmd.Close acForm, "frmSearch"

If the form is apt to be opened again before the app is closed, in it's Form_Load event make sure it's visible again

Forms("frmSearch").Visible = True

BTW, I'm guessing that you think that bold argument

DoCmd.Close acForm, "frmSearch", acSaveNo

refers to not saving a record, but in fact it refers to not saving design changes to the form.

Welcome to Bytes!

Linq ;0)>
May 19 '10 #4
DCon
6
@missinglinq
I actually tried that with no success. I've even resorted to using the following code which also fails; it seems like the form is visible on my desktop but Access doesn't even recognize the form is loaded/visible - you can't interact with it and oddly enough if you click on the Search button on the primary form another instance opens and will close but the ghost of the original form remains; the only recourse is to end the process via task manager.

DoCmd.Close acForm, "frmSearch", acSaveNo
If CurrentProject.AllForms("frmSearch").IsLoaded Then
MsgBox ("frmSearch is still loaded, need to close it")
DoCmd.Close acForm, "frmSearch", acSaveNo
End If
May 19 '10 #5
missinglinq
3,532 Expert 2GB
I guess the next thing I'd try (after making a back up copy of your file) would be to
  1. Create a new, blank database
  2. Import all objects from your original database into the new database
  3. Delete the original database
  4. Rename your new database to the original database name

and see if that solves the problem.

Linq ;0)>
May 19 '10 #6
DCon
6
I've done that already as well, but may try again just to see if it works. Thanks for the post!
May 19 '10 #7
DCon
6
@missinglinq
After copying everything over to a new accdb it still remains open as a "ghost" image; I'm not reall saavy on PC specs but I'm wondering if it's related to RAM the PC I'm using has 1.87 GB.
May 27 '10 #8
missinglinq
3,532 Expert 2GB
Don't know what else to suggest, except to delete and recreate the form, assuming that it's corrupted. Have been looking and can't find any other reports of this problem, and don't run 2007 so I can't try to recreate your problem.

Linq ;0)>
May 27 '10 #9
DCon
6
Appreciate the help; I've resorted to changing the pop up/modal properties both set to "no" and test with that a while, can't help but think it's related to the pop up/modal properties. Going to close this out as it seems to be specific to my configuration.
May 27 '10 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Kyralessa | last post by:
In Access 2000, I have a base form with a ListBox of conference registrants. In the form's declarations section I include Dim f as Form To add a registrant I'm doing this: Set f = New...
5
by: will eichert | last post by:
Greetings. I have a problem with a combo box incorrectly displaying blank items when returning to a form from a modal form. It's fine when the main form first comes up, but gets messed up when the...
4
by: kids_pro | last post by:
Hi there, I want to create a Modal dialog from. Normally in vb it won't allow to click the parent form. But I tried that in C# using form.ShowDialog(this); I still can click on the mainForm...
2
by: Robert W. | last post by:
In my WinForms application, I have a main form, which may or may not be visible depending on the user's wishes. This main form initiates a separate thread that starts a data transfer process. ...
6
by: Chris Thunell | last post by:
I have a form with information on it, when a button is clicked, another form is opened with the following code: Dim myForm As New ReqVendorSelect myForm.Visible = True Once i'm done...
12
by: Ger | last post by:
My dialogue form (sometimes partly, sometimes as a whole) remains visible during a fairly long processing job. The dialogue asks the user to enter some data for the job to follow, and after OK,...
2
by: Govert J. Knopper | last post by:
Here's my C# newbie question: How do I set the position of a modal form? This (correctly) positions top left of the form at the position of the main form: .... Form frmAbout = new About();...
1
by: samentu | last post by:
Hi there. I'm having a little problem here with some forms. Let me describe the problem: my application has a MDI parent form (the form that starts with the application); then when I click a button...
7
by: peridian | last post by:
Hello, This may seem really stupid, but what's the best way to return data from a Modal form?? It seems that Access uses a different Forms library to the other MS apps, and does not have the...
4
by: =?Utf-8?B?Z2luYWNyZXNzZQ==?= | last post by:
I am trying to close/dispose multiple instances of a form but because they are modal and hidden, they do not show up in My.Application.OpenForms. They must be modal, so making them modeless is not...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.