A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

placement of code



 
 
Thread Tools Display Modes
  #1  
Old July 21st, 2004, 02:37 PM
Brigitte P
external usenet poster
 
Posts: n/a
Default placement of code

I have a user who does not have a form to open the
database but goes directly to the tables. I now want to
set Application.SetOption "Show WindowsInTaksbar", False
but don't know where to place this code. For users who
open the database with a startup option form, I placed the
code in the Load Event of the startup form which seems to
work fine, but I don't know what to do when there is no
startup form.
Thanks for any help.
Brigitte P
  #2  
Old July 21st, 2004, 02:54 PM
Brendan Reynolds
external usenet poster
 
Posts: n/a
Default placement of code

If you create a macro called AutoExec, it will run automatically when the
MDB is opened. There is a RunCode macro action you can use to execute code
stored in a standard module.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Brigitte P" wrote in message
...
I have a user who does not have a form to open the
database but goes directly to the tables. I now want to
set Application.SetOption "Show WindowsInTaksbar", False
but don't know where to place this code. For users who
open the database with a startup option form, I placed the
code in the Load Event of the startup form which seems to
work fine, but I don't know what to do when there is no
startup form.
Thanks for any help.
Brigitte P



  #3  
Old July 21st, 2004, 04:55 PM
Brigitte P
external usenet poster
 
Posts: n/a
Default placement of code

All runs fine when I click on the macro or run the code by
itself but it DOES NOT execute automatically. Didn't make
a typing error; I named the macro AutoExec. Any idea what
I'm doing wrong.
The code is in a module named TaskbarOptions

Option Compare Database
Function GlobalOptions()
Application.SetOption "ShowWindowsInTaskbar", False
End Function

The macro is obviously named AutoExec
Action Run Code
Function GlobalOptions()

I think I did it all right, but don't know. If all else
fails, I can create an invisible dummy form with the code
behind and set it as the Start Up form. But I like the
option of an AutoExec macro because I could put all kinds
of thing in the code regardless of startup forms.
Thanks for helping with this.
Brigitte P.

-----Original Message-----
If you create a macro called AutoExec, it will run

automatically when the
MDB is opened. There is a RunCode macro action you can

use to execute code
stored in a standard module.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making

it impossible for
me to use a real e-mail address in public newsgroups. E-

mail replies to
this post will be deleted without being read. Any e-mail

claiming to be
from brenreyn at indigo dot ie that is not digitally

signed by me with a
GlobalSign digital certificate is a forgery and should be

deleted without
being read. Follow-up questions should in general be

posted to the
newsgroup, but if you have a good reason to send me e-

mail, you'll find
a useable e-mail address at the URL above.


"Brigitte P" wrote

in message
...
I have a user who does not have a form to open the
database but goes directly to the tables. I now want to
set Application.SetOption "Show WindowsInTaksbar", False
but don't know where to place this code. For users who
open the database with a startup option form, I placed

the
code in the Load Event of the startup form which seems

to
work fine, but I don't know what to do when there is no
startup form.
Thanks for any help.
Brigitte P



.

  #4  
Old July 21st, 2004, 06:29 PM
Brigitte P
external usenet poster
 
Posts: n/a
Default placement of code

I think I found the problem but don't know how to fix it.
The user must hold down the Shift Key to open the
database, thus the AutoExec macro is bypassed. Normally,
this is a fully secured database (has all our salaries in
it)and has code that allows me to get into the database
window via Macro and Code (supplied by Frank Miller via
the newsgroup), but the one user who is in charge of
budget, don't want a startup form but only the tables. I
left the code to run the bypass key enabled, so when she
holds down the shift key, the database window opens. A
user who doesn't know this, would only get a blank screen.
I suppose I overdid it with securing this database and
just allow her to get in without holding down the shiftkey
(her version is also fully secured). But maybe there is a
way to run the AutoExec Macro or invoke the code another
way, which is independent of the Shift Key.
Help is appreciated.
Brigitte

-----Original Message-----
If you create a macro called AutoExec, it will run

automatically when the
MDB is opened. There is a RunCode macro action you can

use to execute code
stored in a standard module.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making

it impossible for
me to use a real e-mail address in public newsgroups. E-

mail replies to
this post will be deleted without being read. Any e-mail

claiming to be
from brenreyn at indigo dot ie that is not digitally

signed by me with a
GlobalSign digital certificate is a forgery and should be

deleted without
being read. Follow-up questions should in general be

posted to the
newsgroup, but if you have a good reason to send me e-

mail, you'll find
a useable e-mail address at the URL above.


"Brigitte P" wrote

in message
...
I have a user who does not have a form to open the
database but goes directly to the tables. I now want to
set Application.SetOption "Show WindowsInTaksbar", False
but don't know where to place this code. For users who
open the database with a startup option form, I placed

the
code in the Load Event of the startup form which seems

to
work fine, but I don't know what to do when there is no
startup form.
Thanks for any help.
Brigitte P



.

  #5  
Old July 21st, 2004, 08:36 PM
Albert D. Kallal
external usenet poster
 
Posts: n/a
Default placement of code

You can disable the shift key by-pass. But, then this means that all users
will NOT be able to use the shift key option...


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada

http://www.attcanada.net/~kallal.msn


  #6  
Old July 22nd, 2004, 10:49 AM
Brendan Reynolds
external usenet poster
 
Posts: n/a
Default placement of code

In this scenario, there is no way for you to automatically run this code
when the user opens the database. The best that you could do would be to
create an 'AutoKeys' macro so that the user can set the option with a key
combination. I haven't done any work with AutoKeys macros recently, so can't
offer any details, but you should find the basics in the help file, and if
you get stuck I'm sure someone else here will be able to advise you.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Brigitte P" wrote in message
...
I think I found the problem but don't know how to fix it.
The user must hold down the Shift Key to open the
database, thus the AutoExec macro is bypassed. Normally,
this is a fully secured database (has all our salaries in
it)and has code that allows me to get into the database
window via Macro and Code (supplied by Frank Miller via
the newsgroup), but the one user who is in charge of
budget, don't want a startup form but only the tables. I
left the code to run the bypass key enabled, so when she
holds down the shift key, the database window opens. A
user who doesn't know this, would only get a blank screen.
I suppose I overdid it with securing this database and
just allow her to get in without holding down the shiftkey
(her version is also fully secured). But maybe there is a
way to run the AutoExec Macro or invoke the code another
way, which is independent of the Shift Key.
Help is appreciated.
Brigitte

-----Original Message-----
If you create a macro called AutoExec, it will run

automatically when the
MDB is opened. There is a RunCode macro action you can

use to execute code
stored in a standard module.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making

it impossible for
me to use a real e-mail address in public newsgroups. E-

mail replies to
this post will be deleted without being read. Any e-mail

claiming to be
from brenreyn at indigo dot ie that is not digitally

signed by me with a
GlobalSign digital certificate is a forgery and should be

deleted without
being read. Follow-up questions should in general be

posted to the
newsgroup, but if you have a good reason to send me e-

mail, you'll find
a useable e-mail address at the URL above.


"Brigitte P" wrote

in message
...
I have a user who does not have a form to open the
database but goes directly to the tables. I now want to
set Application.SetOption "Show WindowsInTaksbar", False
but don't know where to place this code. For users who
open the database with a startup option form, I placed

the
code in the Load Event of the startup form which seems

to
work fine, but I don't know what to do when there is no
startup form.
Thanks for any help.
Brigitte P



.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form to generate a Report code Pat Coleman Setting Up & Running Reports 4 July 16th, 2004 12:58 PM
Conversion of excel vba code to access vba filnigeria General Discussion 5 July 15th, 2004 02:23 AM
Expression - calculating running total Kathy Running & Setting Up Queries 26 June 22nd, 2004 10:14 PM
Strange annoying problem - long chunk of code John General Discussion 2 June 10th, 2004 07:27 AM


All times are GMT +1. The time now is 02:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.