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

Are there any forms open?

Could someone help me with a function that returns True if there is any other
form open other than "MyForm".

Thank you!

Marcia
Nov 12 '05 #1
2 1226
DFS

"Marcia" <mw*****@earthlink.net> wrote in message
news:cI******************@newsread3.news.atl.earth link.net...
Could someone help me with a function that returns True if there is any other form open other than "MyForm".

Thank you!

Marcia

Marcia, try this:

Function IsOtherFormLoaded(ByVal MyFormName As String) As Integer

' Returns True if a form other than the specified form is loaded.

Dim i as integer

IsOtherFormLoaded = False
For i = 0 To Forms.Count - 1
If Forms(i).formName <> MyFormName Then
IsOtherFormLoaded = True
Exit Function
End If
Next

End Function

Nov 12 '05 #2
A Count value for the Forms collection of greater than one would indicate
that another form is open.

For example,

If Forms.Count > 1 Then
... do what you want for more than one form
End If

Larry Linson
Microsoft Access MVP

"Marcia" <mw*****@earthlink.net> wrote in message
news:cI******************@newsread3.news.atl.earth link.net...
Could someone help me with a function that returns True if there is any other form open other than "MyForm".

Thank you!

Marcia

Nov 12 '05 #3

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

Similar topics

1
by: Hannu | last post by:
Hi. I have in my database linked tables from other access database and i have local tables. My form is linked into local table, but when i open it, it seems to check every table in my database...
5
by: rbp1976 | last post by:
I am a complete newbie with no code experience. I have a form that acts as a switchboard. When I click on a button to open a new form, the old form remains open. This can go on for a few levels and...
1
by: Paul Sampson | last post by:
There is probably a simple answer to this one. I've come from a VB6 background, where I've used the Open event on a form to load data structures, bind controls, etc. Unless I'm overlooking the...
3
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...
6
by: Charles Kincaid | last post by:
I have a project that is working fine: Compiles fine, and runs fine. 13 forms and 3 modules, besides Assembly. It is a smart device (Pocket PC) app. Often some of my forms will NOT open in the...
6
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. ...
13
by: AdamOnAccess | last post by:
Hi, I actually have 3 questions: 1. I work with 2 separate monitors. Working in one Access database, is it possible to have 1 forms open on 1 monitor, and the other form open on the other...
7
by: Mikkel Trebbien | last post by:
I'm trying to play a little bit with Windows Forms, to make a little application. But here's how I'd like it to be: I've made a little link named "SettingsLink" (file is named...
1
by: Joe Farage | last post by:
Is there any way to have Access open the forms that were created and to hide the actual Access program? For instance, when the user opens the database, it is set up to automatically open a certain...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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
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,...

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.