Running code auto

Mike Hughes

Registered User.
Local time
Today, 22:12
Joined
Mar 23, 2002
Messages
493
I posted this under FORMS at first but the question might be better posted here

I have a DB which opens to a form, the form contains one command button which runs VB script which runs some queries and then creates a table and emails that table to some of my workers.

I have two questions:
1. Is it possible to have the command button run when the form is opened and how?
2. The Access DB is connected to an Oracle DB using ODBC. The Oracle DB requires me to enter a password before it starts running the VB script. The password changes monthly. Is there a way to store the password and change it monthly and not be prompted to enter it each time the DB is opened?

I may have the terms wrong but hope you get my drift.

Thanks
 
1. Use the "on open" or "on load" or "on timer" event of the form
2. You may be able to do something with relinking the tables, do some research on my name I have some code out there to do this for linked Access databases but will require some work for ODBC Oracle database. Sotring a database password though will not make your DBA very proud of you :(
 
Thanks for the info...your correct the DBA would not be happy!
 
Mike,

In your form's OnOpen event:

cmdYourCommandButton_Click

The above will run the subroutine for your command button's Click event.

hth,
Wayne
 
1. Use the "on open" or "on load" or "on timer" event of the form
2. You may be able to do something with relinking the tables, do some research on my name I have some code out there to do this for linked Access databases but will require some work for ODBC Oracle database. Sotring a database password though will not make your DBA very proud of you :(

Just so it's known, as I feel jipped of a post :(, I posted in the original post the same answer to question number one about using the "on open" event.....
 
Last edited:

Users who are viewing this thread

Back
Top Bottom