Avatar billede madsuggerby Nybegynder
22. september 2005 - 10:05 Der er 15 kommentarer og
1 løsning

Access lukkes ikke ved brug af DoCmd.Quit - hvorfor

Hej
Jeg har det problem, at mit program lukker når jeg bruger DoCmd.Quit, men umiddelbart efter åbnes et tomt Access-vindue, som jeg efterfølgende kun kan lukke vha. joblisten !!

Gode idéer til hvordan jeg kommer udover dette problem er mere end velkomne ! Kan man evt. lukke Access mere "hårdt" ??!

Mvh. Mads.
Avatar billede terry Ekspert
22. september 2005 - 10:48 #1
Normally docmd.quit should be enough. How are you starting Access?

Mads, you have a couple of old questions still open. If you havent receievd the help you wnat with those then you could palce an answer yourself and get your points back :o)
And also it would reduce the still opened question in Access category from over 1000!
Avatar billede madsuggerby Nybegynder
22. september 2005 - 11:08 #2
I'm starting Access normaly - by dbl-clicking on a database file !

Ok ... but I can't see how to shut down a question when no correct answer is given !?
Avatar billede terry Ekspert
22. september 2005 - 11:14 #3
An dthere is NO code which could cause Access to open again? Have you tried making a very simple database with a form containing a button to close the application? JUst to see of its a general problem with your installation or jsut for the specific application.
Avatar billede madsuggerby Nybegynder
22. september 2005 - 11:18 #4
Yes, I have tryed to locate the problem - it occurs when a form opens another form with an MapX-object (activeX-object). After closing the second form and then the first form (with docmd.quit) then the problem occurs!
Avatar billede terry Ekspert
22. september 2005 - 11:47 #5
so the problem is only in this application and only if you have used the form containing the MapX control?

Know nothing about that MapX activeX control, but are you cleaning up when you are finished using it?
Setting your Object to Nothing and the like!
Avatar billede claesdamlund Nybegynder
22. september 2005 - 11:52 #6
Ligger der noget kode efter din DoCmd.Quit? Kald til andre forms, objekter e.lign.?
Avatar billede madsuggerby Nybegynder
22. september 2005 - 12:40 #7
Terry: Yes, everything is cleaned - an the problem dosn't occur when I don't open the mapx-form from another form !

Claesdamlund: No, there is no code after the DoCmd.Quit command.
Avatar billede terry Ekspert
22. september 2005 - 13:03 #8
it sounds to me as though there is an error in the ActiveX control. Not all ActiveX controls are designed to run in Access, many which are made for VB6 for example can run in Access, but there are also many which dont. I'v ejust looked at MapInfo's home page and cant see if it should be OK for Access, but it only says  "add mapping functionality to any application - quickly and easily."!

I see you have placed a comment on MapInfo site. Maybe you will get some help there.
Avatar billede madsuggerby Nybegynder
22. september 2005 - 13:26 #9
Thank you Terry ... very good research ;o)
Avatar billede terry Ekspert
22. september 2005 - 13:32 #10
I'm just downlaoding the trial to see if I get the same error
Avatar billede terry Ekspert
22. september 2005 - 15:23 #11
havent had success downloading, will give it a try later
Avatar billede madsuggerby Nybegynder
22. september 2005 - 21:37 #12
Okay - nice of you !

I wonder if it is possible to tell Windows to close a program ... that could maybe solve my problem !?
Avatar billede terry Ekspert
23. september 2005 - 12:24 #13
I would think its possible but not something I have tried.

But then what program are you going to use to check this? You cant use Access because its already running!!
Avatar billede terry Ekspert
26. september 2005 - 10:42 #14
After many attempts I finally downloaded and got it installed.

Now I dont know much about how the control works, but I have added a control to a form and set the Geoset property to ...gst.

I can open the form and close it and Access gets terminated correctly.

I do get a message box which states that ....geodict.dct cant be found, not sure what that is.
Avatar billede madsuggerby Nybegynder
26. september 2005 - 10:50 #15
Ok ... it is quit complicated, cause the problem only occurs in a very specific setup ! I'll hope someone at the mapinfo forum with specific knowledge about the MapX-component can help ! But thanks very much for trying :)

Mads.
Avatar billede madsuggerby Nybegynder
11. oktober 2005 - 17:24 #16
Intet anvendeligt svar.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester