473,387 Members | 1,641 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,387 software developers and data experts.

Programatically Set Startup Form on a newly created Database

Hello,

Within my Access program I create a new database using VBA. After the new database is created, I would like to set a form in it to appear on startup.

I have tried using CurrentDb.Properties("StartupForm")
but am not sure what I need to replace CurrentDB with in order to target the newly created DB.

or

Is their any way to export my "startup properties" of the current database to the newly created database?

thank you
Jan 10 '12 #1
1 1627
NeoPa
32,556 Expert Mod 16PB
How does your VBA do that? Does it use Application Automation? Does it close the currently open database first (If so, how is the code still running)?

To get a list of the available properties for a database I used the Immediate Pane of the VBA IDE and ran this code :
Expand|Select|Wrap|Line Numbers
  1. Set db = CurrentDb : For Each prp in db.Properties : ?prp.Name : Next prp
I expect the one you need is StartUpForm.

Also, you can find some working code I use for working with database properties in Database Properties. It may be of some help.
Jan 11 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: John Michael | last post by:
I have created some password routines to protect certain forms from access without a password. This allows me to create some security for apps that will be used on diff machines for users that...
10
by: PC Datasheet | last post by:
How can I programatically set the startup form when the database opens? Thanks! Steve
4
by: mcwooq | last post by:
Hi, I just installed the VS.Studio 2005 Team Edition for Developper and encountered severe problems with debugging ASP.NET 2.0 projects. Even newly empty created ASP 2.0 projects can't debug...
3
by: JAPSTER | last post by:
An application has a startup form (Form1). A second form (frm2), created from within Form1. Each form has a textbox. To access the text in TextBox1 in frm2 from Form1, you use: ...
4
by: Johnnie Miami | last post by:
I'm using VB.Net 2005 beta 2 and have my login form (login.vb) specified as the startup form. If the user is successful logging in, I call my main form (main.vb). This all works fine but the...
10
by: Bernie Hunt | last post by:
This is probably a silly question, but I've gotten myself confused. My app has two forms, form1 and form2. form1 is the start up object in the propers. An event in form1 instantiates form2. ...
2
by: sankaba | last post by:
Hi, I have created a new user for a database that i hav created in DB2, by expanding the database tree diagram in control center right upto DB users folder, and then right clicking it and...
0
by: Jack Russell | last post by:
I just converted my project from Vb.net 2003 to express 2005 I get the following message frmmain is a type in 'TCW3' and cannot be used as an expression. File is TCW3MainForm.vb line 0 column...
2
by: Amjad Mahmood | last post by:
I have recently joined a pharmacuetical company as a Manager M.I.S I have source code of an oracle application developed in 6i by my predecessor. I am unable to take help from him due to some...
22
by: DL | last post by:
Hi, What I wanted to do is to call a function from a newly created element. But it stumbled me. Here's the line that references the newly created element and I used the alert function for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.