|
 |
access thread: ALT F4
Message #1 by "George Oro" <george@c...> on Sun, 15 Dec 2002 08:56:27 +0400
|
|
Hi Guys,
I know this very simple but I cannot figure out.
I want to add ALT F4 to my AutoKeys macro and view a message box ?Please use
the Exit button on the main menu to exit??
My main objective is to force the user to use my Exit button on the main
menu.
Can anyone tell me the syntax? I tried %{F4} but it doesn?t work.
TIA,
George
Message #2 by "bwarehouse" <bwarehouse@y...> on Sun, 15 Dec 2002 10:20:05 -0700
|
|
Are you sure you want to use ALT F4?
It is a system function to close the active window.
If you want it to do ALT FILE Exit use:
%(FX) or %FX
later,
bware
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Saturday, December 14, 2002 9:56 PM
To: Access
Subject: [access] ALT F4
Hi Guys,
I know this very simple but I cannot figure out.
I want to add ALT F4 to my AutoKeys macro and view a message box "Please use
the Exit button on the main menu to exit..."
My main objective is to force the user to use my Exit button on the main
menu.
Can anyone tell me the syntax? I tried %{F4} but it doesn't work.
TIA,
George
Message #3 by "Tom Carnahan" <tcarnahan@c...> on Mon, 16 Dec 2002 03:04:31
|
|
>
Hi Guys,
I know this very simple but I cannot figure out.
I want to add ALT F4 to my AutoKeys macro and view a message box ?Please
use
the Exit button on the main menu to exit??
My main objective is to force the user to use my Exit button on the main
menu.
Can anyone tell me the syntax? I tried %{F4} but it doesn?t work.
TIA,
George
Message #4 by "George Oro" <george@c...> on Mon, 16 Dec 2002 09:09:15 +0400
|
|
Bware,
I typed what you suggested in the Macro Name column and MsgBox in Action and blah.. blah.. blah..
ERROR on both:
The Key or combination in AutoKeys has invalid syntax or in not allowed.
Thanks for your reply,
George
-----Original Message-----
From: bwarehouse [mailto:bwarehouse@y...]
Sent: Sunday, December 15, 2002 9:20 PM
To: Access
Subject: [access] RE: ALT F4
Are you sure you want to use ALT F4?
It is a system function to close the active window.
If you want it to do ALT FILE Exit use:
%(FX) or %FX
later,
bware
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Saturday, December 14, 2002 9:56 PM
To: Access
Subject: [access] ALT F4
Hi Guys,
I know this very simple but I cannot figure out.
I want to add ALT F4 to my AutoKeys macro and view a message box "Please use
the Exit button on the main menu to exit..."
My main objective is to force the user to use my Exit button on the main
menu.
Can anyone tell me the syntax? I tried %{F4} but it doesn't work.
TIA,
George
Message #5 by "Steve Klein" <Stephen@K...> on Mon, 16 Dec 2002 07:15:00 -0000
|
|
You can code the FOKtoClose flag on each form. That is totally rigid in
that it disables Alt F4, close buttons etc.
Dim fOKToClose As Boolean
Private Sub Form_Activate()
End Sub
Private Sub Form_Load()
fOKToClose = False
End Sub
Private Sub Form_Unload(cancel As Integer)
cancel = Not fOKToClose
End Sub
Private Sub cmdQuit_Click()
On Error GoTo Err_cmdquit_Click
fOKToClose = True
DoCmd.Quit acQuitSaveAll
Exit_cmdquit_Click:
Exit Sub
Err_cmdquit_Click:
MsgBox Err.Description
Resume Exit_cmdquit_Click
End Sub
Steve K
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: 16 December 2002 05:09
To: Access
Subject: [access] RE: ALT F4
Bware,
I typed what you suggested in the Macro Name column and MsgBox in Action and
blah.. blah.. blah..
ERROR on both:
The Key or combination in AutoKeys has invalid syntax or in not allowed.
Thanks for your reply,
George
-----Original Message-----
From: bwarehouse [mailto:bwarehouse@y...]
Sent: Sunday, December 15, 2002 9:20 PM
To: Access
Subject: [access] RE: ALT F4
Are you sure you want to use ALT F4?
It is a system function to close the active window.
If you want it to do ALT FILE Exit use:
%(FX) or %FX
later,
bware
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Saturday, December 14, 2002 9:56 PM
To: Access
Subject: [access] ALT F4
Hi Guys,
I know this very simple but I cannot figure out.
I want to add ALT F4 to my AutoKeys macro and view a message box "Please use
the Exit button on the main menu to exit..."
My main objective is to force the user to use my Exit button on the main
menu.
Can anyone tell me the syntax? I tried %{F4} but it doesn't work.
TIA,
George
Message #6 by "George Oro" <george@c...> on Mon, 16 Dec 2002 12:46:13 +0400
|
|
Thanks Steve, actually I have a similar working code like yours. The reason why I need to disabled ALT
F4 is, once the user login,
the User Name and Computer Name are saving in one table therefore no other users can use the same user name. Then, once the user
exit the database using the Exit button on my main menu, automatically his login info will be deleted on the table. The problem is,
for some reason the user will just use ALT F4 any place on the database to exit and the user login info will remain on the table.
The next time the user will login, they will be prompt that " This user name is already in used blah blah blah" which is not.
Any tip that may accomplish my needs is highly appreciated.
TIA,
George
-----Original Message-----
From: Steve Klein [mailto:Stephen@K...]
Sent: Monday, December 16, 2002 11:15 AM
To: Access
Subject: [access] RE: ALT F4
You can code the FOKtoClose flag on each form. That is totally rigid in
that it disables Alt F4, close buttons etc.
Dim fOKToClose As Boolean
Private Sub Form_Activate()
End Sub
Private Sub Form_Load()
fOKToClose = False
End Sub
Private Sub Form_Unload(cancel As Integer)
cancel = Not fOKToClose
End Sub
Private Sub cmdQuit_Click()
On Error GoTo Err_cmdquit_Click
fOKToClose = True
DoCmd.Quit acQuitSaveAll
Exit_cmdquit_Click:
Exit Sub
Err_cmdquit_Click:
MsgBox Err.Description
Resume Exit_cmdquit_Click
End Sub
Steve K
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: 16 December 2002 05:09
To: Access
Subject: [access] RE: ALT F4
Bware,
I typed what you suggested in the Macro Name column and MsgBox in Action and
blah.. blah.. blah..
ERROR on both:
The Key or combination in AutoKeys has invalid syntax or in not allowed.
Thanks for your reply,
George
-----Original Message-----
From: bwarehouse [mailto:bwarehouse@y...]
Sent: Sunday, December 15, 2002 9:20 PM
To: Access
Subject: [access] RE: ALT F4
Are you sure you want to use ALT F4?
It is a system function to close the active window.
If you want it to do ALT FILE Exit use:
%(FX) or %FX
later,
bware
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Saturday, December 14, 2002 9:56 PM
To: Access
Subject: [access] ALT F4
Hi Guys,
I know this very simple but I cannot figure out.
I want to add ALT F4 to my AutoKeys macro and view a message box "Please use
the Exit button on the main menu to exit..."
My main objective is to force the user to use my Exit button on the main
menu.
Can anyone tell me the syntax? I tried %{F4} but it doesn't work.
TIA,
George
Message #7 by braxis@b... on Mon, 16 Dec 2002 09:35:12 +0000 (GMT)
|
|
George
Do you have a form that stays open all the time the database is in use? If so, you could put the security record deleting code in
this forms unload event.
Brian
> from: George Oro <george@c...>
> date: Mon, 16 Dec 2002 08:46:13
> to: access@p...
> subject: Re: [access] RE: ALT F4
>
> Thanks Steve, actually I have a similar working code like yours. The reason why I need to disabled ALT F4 is, once the user
login,
> the User Name and Computer Name are saving in one table therefore no other users can use the same user name. Then, once the
user
> exit the database using the Exit button on my main menu, automatically his login info will be deleted on the table. The problem
is,
> for some reason the user will just use ALT F4 any place on the database to exit and the user login info will remain on the
table.
> The next time the user will login, they will be prompt that " This user name is already in used blah blah blah" which is not.
>
> Any tip that may accomplish my needs is highly appreciated.
>
> TIA,
> George
>
>
>
>
> -----Original Message-----
> From: Steve Klein [mailto:Stephen@K...]
> Sent: Monday, December 16, 2002 11:15 AM
> To: Access
> Subject: [access] RE: ALT F4
>
> You can code the FOKtoClose flag on each form. That is totally rigid in
> that it disables Alt F4, close buttons etc.
>
> Dim fOKToClose As Boolean
>
> Private Sub Form_Activate()
>
> End Sub
>
>
>
> Private Sub Form_Load()
> fOKToClose = False
> End Sub
>
>
> Private Sub Form_Unload(cancel As Integer)
> cancel = Not fOKToClose
> End Sub
>
>
> Private Sub cmdQuit_Click()
> On Error GoTo Err_cmdquit_Click
> fOKToClose = True
> DoCmd.Quit acQuitSaveAll
> Exit_cmdquit_Click:
> Exit Sub
>
> Err_cmdquit_Click:
> MsgBox Err.Description
> Resume Exit_cmdquit_Click
> End Sub
>
>
> Steve K
>
>
> -----Original Message-----
> From: George Oro [mailto:george@c...]
> Sent: 16 December 2002 05:09
> To: Access
> Subject: [access] RE: ALT F4
>
>
> Bware,
> I typed what you suggested in the Macro Name column and MsgBox in Action and
> blah.. blah.. blah..
>
> ERROR on both:
> The Key or combination in AutoKeys has invalid syntax or in not allowed.
>
> Thanks for your reply,
>
> George
>
>
>
> -----Original Message-----
> From: bwarehouse [mailto:bwarehouse@y...]
> Sent: Sunday, December 15, 2002 9:20 PM
> To: Access
> Subject: [access] RE: ALT F4
>
> Are you sure you want to use ALT F4?
> It is a system function to close the active window.
>
> If you want it to do ALT FILE Exit use:
>
> %(FX) or %FX
>
> later,
> bware
> -----Original Message-----
> From: George Oro [mailto:george@c...]
> Sent: Saturday, December 14, 2002 9:56 PM
> To: Access
> Subject: [access] ALT F4
>
>
> Hi Guys,
>
> I know this very simple but I cannot figure out.
>
> I want to add ALT F4 to my AutoKeys macro and view a message box "Please use
> the Exit button on the main menu to exit..."
> My main objective is to force the user to use my Exit button on the main
> menu.
>
> Can anyone tell me the syntax? I tried %{F4} but it doesn't work.
>
> TIA,
> George
>
>
>
>
>
>
>
>
>
>
>
>
Message #8 by "Enzo Zaragoza" <enzaux@g...> on Mon, 16 Dec 2002 17:45:25 +0800
|
|
On this situation I have made use of the UnLoad event, so that before Access close it will ask first
if he wants to log out. Therefore there will be no need for you to over write ALT F4.
Below is a sample code: LogOff is a procedure that will ask if the user wants to log off or not
Private Sub Form_Unload(Cancel As Integer)
If LogOff = False Then
Cancel = 1
End If
End Sub
enzo c",)?
http://www.tropangwatakwatak.tk
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Monday, December 16, 2002 4:46 PM
To: Access
Subject: [access] RE: ALT F4
Thanks Steve, actually I have a similar working code like yours. The reason why I need to disabled ALT F4 is, once the user login,
the User Name and Computer Name are saving in one table therefore no other users can use the same user name. Then, once the user
exit the database using the Exit button on my main menu, automatically his login info will be deleted on the table. The problem is,
for some reason the user will just use ALT F4 any place on the database to exit and the user login info will remain on the table.
The next time the user will login, they will be prompt that " This user name is already in used blah blah blah" which is not.
Any tip that may accomplish my needs is highly appreciated.
TIA,
George
-----Original Message-----
From: Steve Klein [mailto:Stephen@K...]
Sent: Monday, December 16, 2002 11:15 AM
To: Access
Subject: [access] RE: ALT F4
You can code the FOKtoClose flag on each form. That is totally rigid in
that it disables Alt F4, close buttons etc.
Dim fOKToClose As Boolean
Private Sub Form_Activate()
End Sub
Private Sub Form_Load()
fOKToClose = False
End Sub
Private Sub Form_Unload(cancel As Integer)
cancel = Not fOKToClose
End Sub
Private Sub cmdQuit_Click()
On Error GoTo Err_cmdquit_Click
fOKToClose = True
DoCmd.Quit acQuitSaveAll
Exit_cmdquit_Click:
Exit Sub
Err_cmdquit_Click:
MsgBox Err.Description
Resume Exit_cmdquit_Click
End Sub
Steve K
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: 16 December 2002 05:09
To: Access
Subject: [access] RE: ALT F4
Bware,
I typed what you suggested in the Macro Name column and MsgBox in Action and
blah.. blah.. blah..
ERROR on both:
The Key or combination in AutoKeys has invalid syntax or in not allowed.
Thanks for your reply,
George
-----Original Message-----
From: bwarehouse [mailto:bwarehouse@y...]
Sent: Sunday, December 15, 2002 9:20 PM
To: Access
Subject: [access] RE: ALT F4
Are you sure you want to use ALT F4?
It is a system function to close the active window.
If you want it to do ALT FILE Exit use:
%(FX) or %FX
later,
bware
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Saturday, December 14, 2002 9:56 PM
To: Access
Subject: [access] ALT F4
Hi Guys,
I know this very simple but I cannot figure out.
I want to add ALT F4 to my AutoKeys macro and view a message box "Please use
the Exit button on the main menu to exit..."
My main objective is to force the user to use my Exit button on the main
menu.
Can anyone tell me the syntax? I tried %{F4} but it doesn't work.
TIA,
George
Message #9 by "George Oro" <george@c...> on Mon, 16 Dec 2002 16:34:15 +0400
|
|
No, I don't have.
-----Original Message-----
From: braxis@b... [mailto:braxis@b...]
Sent: Monday, December 16, 2002 1:35 PM
To: Access
Subject: [access] RE: ALT F4
George
Do you have a form that stays open all the time the database is in use? If so, you could put the security record deleting code in
this forms unload event.
Brian
> from: George Oro <george@c...>
> date: Mon, 16 Dec 2002 08:46:13
> to: access@p...
> subject: Re: [access] RE: ALT F4
>
> Thanks Steve, actually I have a similar working code like yours. The reason why I need to disabled ALT F4 is, once the user
login,
> the User Name and Computer Name are saving in one table therefore no other users can use the same user name. Then, once the
user
> exit the database using the Exit button on my main menu, automatically his login info will be deleted on the table. The problem
is,
> for some reason the user will just use ALT F4 any place on the database to exit and the user login info will remain on the
table.
> The next time the user will login, they will be prompt that " This user name is already in used blah blah blah" which is not.
>
> Any tip that may accomplish my needs is highly appreciated.
>
> TIA,
> George
>
>
>
>
> -----Original Message-----
> From: Steve Klein [mailto:Stephen@K...]
> Sent: Monday, December 16, 2002 11:15 AM
> To: Access
> Subject: [access] RE: ALT F4
>
> You can code the FOKtoClose flag on each form. That is totally rigid in
> that it disables Alt F4, close buttons etc.
>
> Dim fOKToClose As Boolean
>
> Private Sub Form_Activate()
>
> End Sub
>
>
>
> Private Sub Form_Load()
> fOKToClose = False
> End Sub
>
>
> Private Sub Form_Unload(cancel As Integer)
> cancel = Not fOKToClose
> End Sub
>
>
> Private Sub cmdQuit_Click()
> On Error GoTo Err_cmdquit_Click
> fOKToClose = True
> DoCmd.Quit acQuitSaveAll
> Exit_cmdquit_Click:
> Exit Sub
>
> Err_cmdquit_Click:
> MsgBox Err.Description
> Resume Exit_cmdquit_Click
> End Sub
>
>
> Steve K
>
>
> -----Original Message-----
> From: George Oro [mailto:george@c...]
> Sent: 16 December 2002 05:09
> To: Access
> Subject: [access] RE: ALT F4
>
>
> Bware,
> I typed what you suggested in the Macro Name column and MsgBox in Action and
> blah.. blah.. blah..
>
> ERROR on both:
> The Key or combination in AutoKeys has invalid syntax or in not allowed.
>
> Thanks for your reply,
>
> George
>
>
>
> -----Original Message-----
> From: bwarehouse [mailto:bwarehouse@y...]
> Sent: Sunday, December 15, 2002 9:20 PM
> To: Access
> Subject: [access] RE: ALT F4
>
> Are you sure you want to use ALT F4?
> It is a system function to close the active window.
>
> If you want it to do ALT FILE Exit use:
>
> %(FX) or %FX
>
> later,
> bware
> -----Original Message-----
> From: George Oro [mailto:george@c...]
> Sent: Saturday, December 14, 2002 9:56 PM
> To: Access
> Subject: [access] ALT F4
>
>
> Hi Guys,
>
> I know this very simple but I cannot figure out.
>
> I want to add ALT F4 to my AutoKeys macro and view a message box "Please use
> the Exit button on the main menu to exit..."
> My main objective is to force the user to use my Exit button on the main
> menu.
>
> Can anyone tell me the syntax? I tried %{F4} but it doesn't work.
>
> TIA,
> George
>
>
>
>
>
>
>
>
>
>
>
>
Message #10 by "George Oro" <george@c...> on Mon, 16 Dec 2002 16:34:18 +0400
|
|
For more info, can you show me your LogOff procedure.
TIA,
George
P.S.
So basically there's no other way to include ALT F4 in AutoKeys Macro or to disabled it.
-----Original Message-----
From: Enzo Zaragoza [mailto:enzaux@g...]
Sent: Monday, December 16, 2002 1:45 PM
To: Access
Subject: [access] RE: ALT F4
On this situation I have made use of the UnLoad event, so that before Access close it will ask first
if he wants to log out. Therefore there will be no need for you to over write ALT F4.
Below is a sample code: LogOff is a procedure that will ask if the user wants to log off or not
Private Sub Form_Unload(Cancel As Integer)
If LogOff = False Then
Cancel = 1
End If
End Sub
enzo c",)(tm)
http://www.tropangwatakwatak.tk
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Monday, December 16, 2002 4:46 PM
To: Access
Subject: [access] RE: ALT F4
Thanks Steve, actually I have a similar working code like yours. The reason why I need to disabled ALT F4 is, once the user login,
the User Name and Computer Name are saving in one table therefore no other users can use the same user name. Then, once the user
exit the database using the Exit button on my main menu, automatically his login info will be deleted on the table. The problem is,
for some reason the user will just use ALT F4 any place on the database to exit and the user login info will remain on the table.
The next time the user will login, they will be prompt that " This user name is already in used blah blah blah" which is not.
Any tip that may accomplish my needs is highly appreciated.
TIA,
George
-----Original Message-----
From: Steve Klein [mailto:Stephen@K...]
Sent: Monday, December 16, 2002 11:15 AM
To: Access
Subject: [access] RE: ALT F4
You can code the FOKtoClose flag on each form. That is totally rigid in
that it disables Alt F4, close buttons etc.
Dim fOKToClose As Boolean
Private Sub Form_Activate()
End Sub
Private Sub Form_Load()
fOKToClose = False
End Sub
Private Sub Form_Unload(cancel As Integer)
cancel = Not fOKToClose
End Sub
Private Sub cmdQuit_Click()
On Error GoTo Err_cmdquit_Click
fOKToClose = True
DoCmd.Quit acQuitSaveAll
Exit_cmdquit_Click:
Exit Sub
Err_cmdquit_Click:
MsgBox Err.Description
Resume Exit_cmdquit_Click
End Sub
Steve K
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: 16 December 2002 05:09
To: Access
Subject: [access] RE: ALT F4
Bware,
I typed what you suggested in the Macro Name column and MsgBox in Action and
blah.. blah.. blah..
ERROR on both:
The Key or combination in AutoKeys has invalid syntax or in not allowed.
Thanks for your reply,
George
-----Original Message-----
From: bwarehouse [mailto:bwarehouse@y...]
Sent: Sunday, December 15, 2002 9:20 PM
To: Access
Subject: [access] RE: ALT F4
Are you sure you want to use ALT F4?
It is a system function to close the active window.
If you want it to do ALT FILE Exit use:
%(FX) or %FX
later,
bware
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Saturday, December 14, 2002 9:56 PM
To: Access
Subject: [access] ALT F4
Hi Guys,
I know this very simple but I cannot figure out.
I want to add ALT F4 to my AutoKeys macro and view a message box "Please use
the Exit button on the main menu to exit..."
My main objective is to force the user to use my Exit button on the main
menu.
Can anyone tell me the syntax? I tried %{F4} but it doesn't work.
TIA,
George
Message #11 by "Charlie Goodwin" <cgoodwin@c...> on Mon, 16 Dec 2002 12:51:49 -0500
|
|
George,
Dev Anish has some code you might want to look at. Check out
http://www.mvps.org/access/general/gen0005.htm
It looks like the code there does a pretty neat job of keeping someone IN t
he Database, till they exit your desired way. Lotta good stuff shared on
his site.
Charlie
> No, I don't have.
>
>
> -----Original Message-----
> From: braxis@b... [mailto:braxis@b...] [mailto:braxis
@btinternet.com]]
> Sent: Monday, December 16, 2002 1:35 PM
> To: Access
> Subject: [access] RE: ALT F4
>
> George
>
> Do you have a form that stays open all the time the database is in use? I
f so, you could put the security record deleting code in
> this forms unload event.
>
> Brian
>
> > from: George Oro <george@c...>
> > date: Mon, 16 Dec 2002 08:46:13
> > to: access@p...
> > subject: Re: [access] RE: ALT F4
> >
> > Thanks Steve, actually I have a similar working code like yours. The re
ason why I need to disabled ALT F4 is, once the user login,
> > the User Name and Computer Name are saving in one table therefore no ot
her users can use the same user name. Then, once the user
> > exit the database using the Exit button on my main menu, automatically
his login info will be deleted on the table. The problem
> is,
> > for some reason the user will just use ALT F4 any place on the database
to exit and the user login info will remain on the table.
> > The next time the user will login, they will be prompt that " This user
name is already in used blah blah blah" which is not.
> >
> > Any tip that may accomplish my needs is highly appreciated.
> >
> > TIA,
> > George
> >
> >
> >
> >
> > -----Original Message-----
> > From: Steve Klein [mailto:Stephen@K...] [mailto:Step
hen@K...]]
> > Sent: Monday, December 16, 2002 11:15 AM
> > To: Access
> > Subject: [access] RE: ALT F4
> >
> > You can code the FOKtoClose flag on each form. That is totally rigid
in
> > that it disables Alt F4, close buttons etc.
> >
> > Dim fOKToClose As Boolean
> >
> > Private Sub Form_Activate()
> >
> > End Sub
> >
> >
> >
> > Private Sub Form_Load()
> > fOKToClose =3D False
> > End Sub
> >
> >
> > Private Sub Form_Unload(cancel As Integer)
> > cancel =3D Not fOKToClose
> > End Sub
> >
> >
> > Private Sub cmdQuit_Click()
> > On Error GoTo Err_cmdquit_Click
> > fOKToClose =3D True
> > DoCmd.Quit acQuitSaveAll
> > Exit_cmdquit_Click:
> > Exit Sub
> >
> > Err_cmdquit_Click:
> > MsgBox Err.Description
> > Resume Exit_cmdquit_Click
> > End Sub
> >
> >
> > Steve K
> >
> >
> > -----Original Message-----
> > From: George Oro [mailto:george@c...] [mailto:george@c...
om]]
> > Sent: 16 December 2002 05:09
> > To: Access
> > Subject: [access] RE: ALT F4
> >
> >
> > Bware,
> > I typed what you suggested in the Macro Name column and MsgBox in Actio
n and
> > blah.. blah.. blah..
> >
> > ERROR on both:
> > The Key or combination in AutoKeys has invalid syntax or in not allowed.
> >
> > Thanks for your reply,
> >
> > George
> >
> >
> >
> > -----Original Message-----
> > From: bwarehouse [mailto:bwarehouse@y...] [mailto:bwarehouse@y...
com]]
> > Sent: Sunday, December 15, 2002 9:20 PM
> > To: Access
> > Subject: [access] RE: ALT F4
> >
> > Are you sure you want to use ALT F4?
> > It is a system function to close the active window.
> >
> > If you want it to do ALT FILE Exit use:
> >
> > %(FX) or %FX
> >
> > later,
> > bware
> > -----Original Message-----
> > From: George Oro [mailto:george@c...] [mailto:george@c...
om]]
> > Sent: Saturday, December 14, 2002 9:56 PM
> > To: Access
> > Subject: [access] ALT F4
> >
> >
> > Hi Guys,
> >
> > I know this very simple but I cannot figure out.
> >
> > I want to add ALT F4 to my AutoKeys macro and view a message box "Pleas
e use
> > the Exit button on the main menu to exit..."
> > My main objective is to force the user to use my Exit button on the main
> > menu.
> >
> > Can anyone tell me the syntax? I tried %{F4} but it doesn't work.
> >
> > TIA,
> > George
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
Message #12 by "Steve Klein" <Stephen@K...> on Mon, 16 Dec 2002 17:49:08 -0000
|
|
I think the secret is to ensure that the fOKToClose = False flag is set on
EVERY form. That way Alt f4 should remain set to false.
Steve K
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: 16 December 2002 08:46
To: Access
Subject: [access] RE: ALT F4
Thanks Steve, actually I have a similar working code like yours. The reason
why I need to disabled ALT F4 is, once the user login,
the User Name and Computer Name are saving in one table therefore no other
users can use the same user name. Then, once the user
exit the database using the Exit button on my main menu, automatically his
login info will be deleted on the table. The problem is,
for some reason the user will just use ALT F4 any place on the database to
exit and the user login info will remain on the table.
The next time the user will login, they will be prompt that " This user name
is already in used blah blah blah" which is not.
Any tip that may accomplish my needs is highly appreciated.
TIA,
George
-----Original Message-----
From: Steve Klein [mailto:Stephen@K...]
Sent: Monday, December 16, 2002 11:15 AM
To: Access
Subject: [access] RE: ALT F4
You can code the FOKtoClose flag on each form. That is totally rigid in
that it disables Alt F4, close buttons etc.
Dim fOKToClose As Boolean
Private Sub Form_Activate()
End Sub
Private Sub Form_Load()
fOKToClose = False
End Sub
Private Sub Form_Unload(cancel As Integer)
cancel = Not fOKToClose
End Sub
Private Sub cmdQuit_Click()
On Error GoTo Err_cmdquit_Click
fOKToClose = True
DoCmd.Quit acQuitSaveAll
Exit_cmdquit_Click:
Exit Sub
Err_cmdquit_Click:
MsgBox Err.Description
Resume Exit_cmdquit_Click
End Sub
Steve K
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: 16 December 2002 05:09
To: Access
Subject: [access] RE: ALT F4
Bware,
I typed what you suggested in the Macro Name column and MsgBox in Action and
blah.. blah.. blah..
ERROR on both:
The Key or combination in AutoKeys has invalid syntax or in not allowed.
Thanks for your reply,
George
-----Original Message-----
From: bwarehouse [mailto:bwarehouse@y...]
Sent: Sunday, December 15, 2002 9:20 PM
To: Access
Subject: [access] RE: ALT F4
Are you sure you want to use ALT F4?
It is a system function to close the active window.
If you want it to do ALT FILE Exit use:
%(FX) or %FX
later,
bware
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Saturday, December 14, 2002 9:56 PM
To: Access
Subject: [access] ALT F4
Hi Guys,
I know this very simple but I cannot figure out.
I want to add ALT F4 to my AutoKeys macro and view a message box "Please use
the Exit button on the main menu to exit..."
My main objective is to force the user to use my Exit button on the main
menu.
Can anyone tell me the syntax? I tried %{F4} but it doesn't work.
TIA,
George
|
|
 |