Avatar billede gp Nybegynder
06. marts 2002 - 18:04 Der er 15 kommentarer og
1 løsning

Kryds der afslutter access

Jeg har brug af at fjerne det kryds der afslutter Access. Da brugerne får ændret der skærm størrelse når de åbner db, og da de skal lukke db'en med min egen knap for at komme tilbage til deres oprindelige skærm størrelse.
GP
Avatar billede henrik13 Nybegynder
06. marts 2002 - 18:08 #1
Du kan få access til at fylde hele skærmen, Så er krydset der ikke.
VH Henrik
Avatar billede henrik13 Nybegynder
06. marts 2002 - 18:09 #2
I en formular selvfølgelig. Er du interesserede kan jeg sende et eksempel.
VH Henrik
Avatar billede terry Ekspert
06. marts 2002 - 18:34 #3
You can have a form which you hide and in that form you place code which stops Access from being closed!

To hide the form:
Set the forms BorderStyle, ScroolBars, RecordSelectors and NavigationButtons properties to None. Then set the detail sections height to zero.
You then need to open this form when your application starts up!

In the forms code module place the following

Public OKToClose as Boolean

In the forms Unload event

If Not OKToClose Then
  Cancel = True
End If

In the form which you close the application place this in a buttons on click event

Forms!frmYourForm.OKToClose = True
application.quit

NOTE: You have to replace frmYourForm with the name of the form.
Avatar billede gp Nybegynder
06. marts 2002 - 19:25 #4
Det skal ikke være i en formular men i Access hoved, eller hvis det er muligt at ændre i at bruge min lukke knap i min formular
Avatar billede henrik13 Nybegynder
06. marts 2002 - 19:28 #5
Nej men det styres fra en formular. Det er det aller øverste kryds du skriver om
VH Henrik
Avatar billede gp Nybegynder
06. marts 2002 - 19:30 #6
Ja
Avatar billede gp Nybegynder
06. marts 2002 - 19:31 #7
Henrik13 du må gerne sende et eks. gp@privat.dk
Avatar billede gp Nybegynder
06. marts 2002 - 19:38 #8
Henrik den kan jeg ikke bruge, det skal desværre være i Access hoved
Avatar billede terry Ekspert
06. marts 2002 - 19:44 #9
gp> IF I understand you correctly, you want to STOP users from exiting Access by pressing the X in the main Access window.

My solution STOPS users from exiting Access unless they press the correct button!
Avatar billede gp Nybegynder
06. marts 2002 - 21:16 #10
Terry: Can I have

Forms!frmYourForm.OKToClose = True
application.quit

as a closed button in the menu line?
Avatar billede terry Ekspert
06. marts 2002 - 21:22 #11
not sure what you mean "as a closed button in the menu line?"

Have you made your own menu?

You could put the code in a module and call it from a user define menu, or you could have it on your main form.
Avatar billede gp Nybegynder
06. marts 2002 - 21:27 #12
Is this (NOTE: You have to replace frmYourForm with the name of the form.) the hidden form or the form with the closed button.
Avatar billede terry Ekspert
06. marts 2002 - 21:32 #13
frmYourForm is the hidden form but this is (for example) on a close button on a visible form

Forms!frmYourForm.OKToClose = True
application.quit
Avatar billede terry Ekspert
06. marts 2002 - 21:35 #14
When you try to close ACCESS either with application.quit  or by pressing the X on the main ACCESS form, Access attempts to close all open forms etc. This gives you the chance to save any unchanged data. Access will also try to close the hidden form, so if you have this code In the (HIDDEN) forms Unload event

If Not OKToClose Then
  Cancel = True
End If

then it will STOP Access from closing (smart):o)
Avatar billede gp Nybegynder
06. marts 2002 - 21:36 #15
Thanks! it is perfekt!!!
Avatar billede terry Ekspert
06. marts 2002 - 21:38 #16
thank you :o)
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