473,403 Members | 2,284 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,403 software developers and data experts.

Question: How to launch a Module of code on startup

Thanks for taking the time to read my question and hopefully it will
be understandable.

I have a need to read a record in a table and place the information in
public variables that can be used in several forms and reports. Is
this an easy process and how would I do this.

I know how to read the data and place them in the variables but I
can't figure out how to automate this at startup.

Please help me

N. Graves
Nov 13 '05 #1
6 2298
On Fri, 02 Jul 2004 13:59:19 -0400, N. Graves
<ng*****@REMOVEyahoo.com> wrote:
Thanks for taking the time to read my question and hopefully it will
be understandable.

I have a need to read a record in a table and place the information in
public variables that can be used in several forms and reports. Is
this an easy process and how would I do this.

I know how to read the data and place them in the variables but I
can't figure out how to automate this at startup.

Please help me

N. Graves


Use the Open event of a startup form to set the variables.

Note that if you have a runtime error, your variables will be wiped
out. An alternative might be to use invisible text boxes on an always
open form to hold the values.

- Jim
Nov 13 '05 #2
rkc

"N. Graves" <ng*****@REMOVEyahoo.com> wrote in message
news:ua********************************@4ax.com...
Thanks for taking the time to read my question and hopefully it will
be understandable.

I have a need to read a record in a table and place the information in
public variables that can be used in several forms and reports. Is
this an easy process and how would I do this.

I know how to read the data and place them in the variables but I
can't figure out how to automate this at startup.


There's the Autoexec macro and the Tools, Startup options.
Look up 'Control how an Access file looks and behaves when it
opens' in help. I'd be inclined to open a form on startup and
run the necessary code in the forms Open event.

Nov 13 '05 #3
Create a blank form and set its visible property to No. Put the code to manage
your public variables in the OnOpen event of the form. Go to Tools - Startup and
at the top right of the dialog box set this form to open when the database
starts. You won't see the form but it will open and your code will execute.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"N. Graves" <ng*****@REMOVEyahoo.com> wrote in message
news:ua********************************@4ax.com...
Thanks for taking the time to read my question and hopefully it will
be understandable.

I have a need to read a record in a table and place the information in
public variables that can be used in several forms and reports. Is
this an easy process and how would I do this.

I know how to read the data and place them in the variables but I
can't figure out how to automate this at startup.

Please help me

N. Graves

Nov 13 '05 #4
Good Idea thanks!

N. Graves

On Fri, 02 Jul 2004 19:00:14 GMT, "Jim Allensworth"
<ji****@Notdatacentricsolutions.com> wrote:
On Fri, 02 Jul 2004 13:59:19 -0400, N. Graves
<ng*****@REMOVEyahoo.com> wrote:
Thanks for taking the time to read my question and hopefully it will
be understandable.

I have a need to read a record in a table and place the information in
public variables that can be used in several forms and reports. Is
this an easy process and how would I do this.

I know how to read the data and place them in the variables but I
can't figure out how to automate this at startup.

Please help me

N. Graves


Use the Open event of a startup form to set the variables.

Note that if you have a runtime error, your variables will be wiped
out. An alternative might be to use invisible text boxes on an always
open form to hold the values.

- Jim


Nov 13 '05 #5
Thank you very much for your input!

N. Graves

On Fri, 02 Jul 2004 19:01:16 GMT, "rkc"
<rk*@yabba.dabba.do.rochester.rr.bomb> wrote:

"N. Graves" <ng*****@REMOVEyahoo.com> wrote in message
news:ua********************************@4ax.com.. .
Thanks for taking the time to read my question and hopefully it will
be understandable.

I have a need to read a record in a table and place the information in
public variables that can be used in several forms and reports. Is
this an easy process and how would I do this.

I know how to read the data and place them in the variables but I
can't figure out how to automate this at startup.


There's the Autoexec macro and the Tools, Startup options.
Look up 'Control how an Access file looks and behaves when it
opens' in help. I'd be inclined to open a form on startup and
run the necessary code in the forms Open event.


Nov 13 '05 #6
Good Idea thanks for the info!

N. Graves

On Fri, 02 Jul 2004 19:03:25 GMT, "PC Datasheet" <no****@nospam.spam>
wrote:
Create a blank form and set its visible property to No. Put the code to manage
your public variables in the OnOpen event of the form. Go to Tools - Startup and
at the top right of the dialog box set this form to open when the database
starts. You won't see the form but it will open and your code will execute.


Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: The Jetman | last post by:
I'm trying to port PyWin into a limited version of Windows XP, called BartPE. Essentially, it's a matter of taking the installed elements of most WinApps (ie. registry settings and files) and...
13
by: Ghislain Tanguay | last post by:
I have a compiled vb.net app and I want to give the user a choice to launch it from the start line command and pass it a parameter or not. How can I do that in my code? Is it possible? Ex. :...
2
by: bidalah | last post by:
Hi, I have created a program which opens up ".pcfs" files, a kind of text file unique to my program. I want to be able to click on these files and have the program launch AND load the contents...
3
by: John Wright | last post by:
How can I set the property of a loaded Assembly using reflection. My Shell program will log in a person and retrieve a list of all programs the person can use. When the shell program launches a...
2
by: kilnhead | last post by:
I am trying to use eclipse for python development. Is it possible to run a python script without having to name/setup a configuration? Can eclipse be set up so that "run" loads the code into the...
8
by: Marcus | last post by:
I have this application I have made that I launch when the user logs into Windows XP. I would like to delay the launch of the application so that it starts 1 minute after the user has logged in. ...
6
by: =?Utf-8?B?UmljaA==?= | last post by:
Greetings, I am deploying vb2005 apps using Click Once deployment. This works fine. The problem is that the user needs to be able to launch a 2nd app from the 1st app, but the application...
0
by: =?Utf-8?B?R2FyeSBNY0M=?= | last post by:
The quick launch tool bar doesn't load on startup in my user account. It works fine by clicking on the Task bar and selecting Quick Launch, but it doesn't seem to save the setting when I shut down...
4
by: Jeff Ciaccio | last post by:
I'm new to vb.net and was wondering what the syntax is for application events such as starting up or shutting down. For example, if you would just like to get a user's name with an input box when...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.