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

inspecting whether a form is open

Hi.
How to check whether some form is open or not, in VBA ?
Thanks.
Nov 13 '05 #1
2 1810
Zlatko,

'----------------------------
Function IsLoaded(ByVal strFormName As String) As Boolean
' Returns True if the specified form is open in Form view or Datasheet
view.

Const conObjStateClosed = 0
Const conDesignView = 0

If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <>
conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsLoaded = True
End If
End If

End Function
'--------------------------
Bill E.
Hollywood, FL

Nov 13 '05 #2
Hi!.
Thanks again:)

<bi********@netscape.net> je napisao u poruci interesnoj
grupi:11**********************@o13g2000cwo.googleg roups.com...
Zlatko,

'----------------------------
Function IsLoaded(ByVal strFormName As String) As Boolean
' Returns True if the specified form is open in Form view or Datasheet
view.

Const conObjStateClosed = 0
Const conDesignView = 0

If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <>
conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsLoaded = True
End If
End If

End Function
'--------------------------
Bill E.
Hollywood, FL

Nov 13 '05 #3

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

Similar topics

3
by: John | last post by:
Dear all, It been more than 3 days I am trying to debug this program, I interpret it using activePerl and it is giving (perl -wc code_process.pl) no error syntax but when I put it online, change...
1
by: bala | last post by:
hi there the senario - an A2k application is distributed as a mdb to various users. they are not packaged. rich textbox is being used in one form. requirement - in some of the user's machine...
8
by: M D | last post by:
cmd.CommandText = "SELECT TOP 1 * FROM " + target.Text; conn.Open(); tableReader = cmd.ExecuteReader(); schemaTable = tableReader.GetSchemaTable(); where k is the primary key field: ...
7
by: Xero | last post by:
How do you detect whether a form has been closed or not? Thanks. -- Xero http://www.chezjeff.net My personal web portal
2
by: MLH | last post by:
I use the following in A97 to tell if a form is open: If IsNull(TheForm) Then Exit Function IsFormOpen = SysCmd(acSysCmdGetObjectState, acForm, TheForm) Is there a way I can tell if it is open...
6
by: Ros | last post by:
There are 10 files in the folder. I wish to process all the files one by one. But if the files are open or some processing is going on them then I do not want to disturb that process. In that case...
2
by: sumuka | last post by:
Hello, I'm doing a vb6 project in which i've a flexgrid and when the user clicks on the 3rd column 1st row a new form (frm.edit) will open and this form displays some data now when i want click...
5
by: Neil | last post by:
"lyle" <lyle.fairfield@gmail.comwrote in message news:48c3dde7-07bd-48b8-91c3-e157b703f92b@f3g2000hsg.googlegroups.com... Question for you. I'm doing something similar, only, instead of opening...
6
by: Alexander Vasilevsky | last post by:
How do I know whether the file is text or binary? http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas discount
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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...

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.