473,468 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to determine whether any report is opened?

How could I determine, in VBA, whether any report (print preview) is
currently opened?

Thanks,

Zlatko
Dec 18 '05 #1
5 6314
Zlatko Matić wrote in message <do**********@ss405.t-com.hr> :
How could I determine, in VBA, whether any report (print preview) is
currently opened?

Thanks,

Zlatko


I don't know how to check which view it is open in, but I think you
can find open reports through for instance the reports collection

debug.print reports.count ' number of open reports

dim rpt as report
for each rpt reports
debug.print rpt.name
next rpt

--
Roy-Vidar

Dec 18 '05 #2
rkc
Zlatko Matić wrote:
How could I determine, in VBA, whether any report (print preview) is
currently opened?


Function OpenReports() As Variant
Dim rpt As Access.AccessObject
Dim s As String

For Each rpt In Application.CurrentProject.AllReports
With rpt
If .IsLoaded Then
If .CurrentView = acCurViewPreview Then
s = s & "," & .Name
End If
End If
End With
Next rpt

OpenReports = Split(Mid$(s, 2), ",")

End Function
Sub showOpenReports()
Dim v As Variant
Dim i As Integer

v = OpenReports()

For i = 0 To UBound(v)
Debug.Print v(i)
Next

End Sub
Dec 18 '05 #3
CBool(Reports.Count)

Dec 18 '05 #4
rkc
Lyle Fairfield wrote:
CBool(Reports.Count)


Shouldn't you be <pc="on"> Holiday <pc="off"> shopping or something?

Dec 18 '05 #5
Thanks to all who answered!

Zlatko

"Lyle Fairfield" <ly***********@aim.com> je napisao u poruci interesnoj
grupi:11**********************@g43g2000cwa.googleg roups.com...
CBool(Reports.Count)

Dec 20 '05 #6

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

Similar topics

4
by: MLH | last post by:
From FormA or from the immediate window, what can I run to determine if a specified control (say, "MyComboBox") exists on FormB (or ReportB)? We could narrow it down, specifying that FormB (or...
1
by: monskie | last post by:
Hello to all, I have a problem which could be trivial to you guys. This concerns opening several crystal reports on the a crystal viewer on an ASPX page by calling window.open. My...
2
by: rinmanb70 | last post by:
I have a QBF form/query and a report from the QBF that shows the results of the QBF. I would like to show the criteria on the report that was used in the QBF to get the info on report. I can't...
3
by: John | last post by:
In my app I've created a label report (Avery 7162, 2 colums, 8 rows) with the wizzard. The report is based on a temp table that is created when the user pushes a button. After creation of the table...
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...
19
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...
11
by: BASSPU03 | last post by:
Tomorrow's my final presentation of my DB and I ran into an unexpected problem: I access a main form called frmViewAllResources with several tabbed subforms through my switchboard. There's a preview...
16
by: Steve | last post by:
I am working on a database that has a main menu, many sub-menus and some sub-sub-menus. They are all forms that have numerous command buttons on them to open forms and reports in the database. The...
4
by: vinod allapu | last post by:
hi all, I have a aspx page which can be opened directly or it can be opened from other aspx page using javascript window.open .... now i need to check whether it is open from a parent...
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
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.