|
-
Feb 20th, 2000, 05:43 PM
#1
Thread Starter
Junior Member
Everytime I add a new form to my project and want to access a database, I have to declare it, and open it.
Dim db as database
db.opendatabase("..path..")
Is there any way I dont have to declare it in every form ?
-
Feb 20th, 2000, 07:21 PM
#2
Addicted Member
Use the Public statement to declare the db variable in the module section. Add new module to your project and place
Public db As Database
Variables declared using the Public statement are available to all procedures in all modules. You can open a database in any form.
------------------
smalig
[email protected]
http://vbcode.webhostme.com/
-
Feb 21st, 2000, 01:15 AM
#3
PowerPoster
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|