473,785 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OPEN FORMS

Hi
I've a database where i want a form to open when the db is opened.

The code i've written does not call activate the form when the db is
opened

Option Compare Database

Public open_db()

DoCmd.OpenForm (Form_Frm_Issue s_Log,acnormal)

End Sub

Jan 24 '07 #1
3 1722


On Jan 24, 12:24 am, "AFKAFB" <chris.by...@cb a.com.auwrote:
Hi
I've a database where i want a form to open when the db is opened.

The code i've written does not call activate the form when the db is
opened

Option Compare Database

Public open_db()

DoCmd.OpenForm (Form_Frm_Issue s_Log,acnormal)

End Sub
The way I do this is with a macro called AutoExec. In the AutoExec
macro select OpenForm for the action and put the name of the form to
open in the Form Name box. An AutoExec macro, which runs automatically
if present when Access is opened, is the only macro I ever use
(pre-2007). I almost always use one Action line -- either OpenForm or
RunCode. Some people like to use the Startup options instead to
specify an initial form to open. I usually put quotes around the form
name when using DoCmd.OpenForm so I'm not sure if your syntax will work
or not. For example, I use:

DoCmd.OpenForm "frmQuotes" , , , , , , strQuoteID

Post back if you have any questions.

James A. Fortune
CD********@Fort uneJames.com

Jan 24 '07 #2


On Jan 24, 12:24 am, "AFKAFB" <chris.by...@cb a.com.auwrote:
Hi
I've a database where i want a form to open when the db is opened.

The code i've written does not call activate the form when the db is
opened

Option Compare Database

Public open_db()

DoCmd.OpenForm (Form_Frm_Issue s_Log,acnormal)

End Sub
One more thing. Is your form actually named Form_Frm_Issues _Log? If
so, do you realize that the Form_ syntax has a special meaning in
Access and your form name can be misinterpreted as a class reference to
a form called Frm_Issues_Log?

James A. Fortune
CD********@Fort uneJames.com

Jan 24 '07 #3
AFKAFB wrote:
Hi
I've a database where i want a form to open when the db is opened.
You can use the autoexec macro as James describes or go to
Tools->StartUp. There is a drop down (combobox) on the right entitled
"Display form/page". Choose the name of the form you want to be opened
when your mdb is opened.

The settings in startup can be bypassed when opening the mdb by holding
the shift key down while you open the mdb.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Jan 24 '07 #4

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

Similar topics

55
4676
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's not obvious how the code works if you don't know the intricacies of the Property Let/Get syntax. Likewise, I dislike (and code to minimize the use of) the VB/VBA syntax of returning a value by referring to the function name as if it were a...
6
3649
by: Kenneth Courville | last post by:
Hello, I'm looking for assistance with the Access object model. I know this is VB, but I'm building an Office Add-using C# directed at Access 2002. I'm literate in VB, so you can reply in VB... I think my problem mainly lies in knowing the quirks of the Access object model. Basically, I'm looking for a method of determining if an Access database is open yet. AND I'm looking for a method that doesn't not require checking for an...
3
3787
by: stumorgan | last post by:
There is probably an extremely simple answer to this question and I'm just being foolish. I have a main form (let's say FormMain) which opens other forms (let's say Form1, Form2). How do I keep those created forms, Form1 and Form2, from closing when I close FormMain? Right now what I'm doing is threading them by wrapping the Show method and in that threaded wrapper I have a while loop that just does Application.DoEvents() as long as...
13
2952
by: Academic | last post by:
I have a MDI form, sometimes child forms and sometimes forms that are neither If I close the app the child forms closing and closed event happens followed by the Mdi form receiving the events.. But the regular forms that are also open do not receive that event. This is true whether there are child forms open or not.
4
2187
by: robert.waters | last post by:
Hello, I have a main form that is maximized when my application loads; this main form contains links to all other forms. I've had to specify the Popup property of these other forms, so that they are not maximized when they load. Unfortunately, this seems to have had the consequence of removing them from the Windows taskbar, which makes navigating between open forms more difficult. How would you developers deal with navigation between...
6
2659
by: Bob Alston | last post by:
Looking for someone with experience building apps with multiple instances of forms open. I am building an app for a nonprofit organizations case workers. They provide services to the elderly. so far I have built a traditional app, switchboard, forms, etc. Part of this app is to automate the forms they previously prepared manually. After the app was built and works just fine, I find out there are several case managers using MS word...
13
3553
by: robert.waters | last post by:
Do you have your users rely on the windows taskbar to manage/navigate between the forms they have open, or do you provide another (more robust) method? Does anyone use a custom navigation system (like keeping a selectable list of open forms in a listbox/commandbar/ breadcrumb trail etc.)?
19
19044
by: =?Utf-8?B?R3JlZw==?= | last post by:
How can I tell via code if a Form is already open. Each time my forms load I have some initialization code that runs, but if the form is already open and hidden I don't want that initialization code to run. Thus, I just want to unhide the form. My thought is eveyrtime I go to load a form I could scan through all the open forms in my project and determine whether the one I'm getting ready to load is open or not.
4
2691
by: nottarealaddress | last post by:
I'm trying to get my feet wet in VB2005 (our new standard at work after officially stopping new development in VB6 about a month ago). I'm working with a simple sql 2005 table of 50 entries, one for each state. Each entry contains Name, postal abbreviation, etc. Just simple stuff to understand the mechanisms, syntax, etc. I'm now to the point where I've got a Master MDI form that opens one or more types of forms, I'm able to edit/save...
9
3406
by: vanlanjl | last post by:
Okay lets see if I can do this with out confusing myself or others. First I will give ALL the details then state my problem and request at the bottom. Tables: tblContacts ID Company LastName FirstName Initial
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10091
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8972
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.