Hi,
Being very dumb today!
I need to know, in VBA code, which form was used to call a report (using DoCmd.OpenReport)
Must be some sort of method or property to do this???
TIA
Steve
4 1277
Hi,
Being very dumb today!
I need to know, in VBA code, which form was used to call a report (using DoCmd.OpenReport)
Must be some sort of method or property to do this???
TIA
Steve
Use the OpenArgs Property of the OpenReport Method as in: - Dim stDocName As String
-
-
stDocName = "rptEmployee"
-
DoCmd.OpenReport stDocName, acPreview, , , acWindowNormal, "My Form Name"
Then, in the Report's Open() Event, place code similiar to this. This should point you in the right direction. - Private Sub Report_Open(Cancel As Integer)
-
If Not IsNull(Me.OpenArgs) Then
-
MsgBox "Form " & Me.OpenArgs & " opened this Report"
-
End If
-
End Sub
Hi, ADezii
Thx for your response.
Unfortunately, the OpenArgs property is already in use for other purposes ;-(
Ho hum
Steve
Hi, ADezii
Thx for your response.
Unfortunately, the OpenArgs property is already in use for other purposes ;-(
Ho hum
Steve
How about assigning a Public Variable representing the Form's Name when it is opened. It can then be read anywhere within the Project?
NeoPa 32,556
Expert Mod 16PB
I don't think there is a prescribed way to do this I'm afraid Cyber.
ADezii's idea is probably the best you'll get.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: endran |
last post by:
Hi Friends
how to stop reopen form which already opened.
for example my form code is like this
every time when i click opening the form i want to stop
that please help
M.A.Endran
Private...
|
by: Simone |
last post by:
Hi,
I'm a DB newbie and I've been having issues trying to print the record
I am viewing in a form to a report. I have looked in groups all over
and they all say to try basically the same thing...
|
by: ian.davies52 |
last post by:
Is there anything I can do about the apparent limit on the number of
textboxes that have calculations as their control source on a form or
report in ms-access? I have a query that pulls together...
|
by: Maileen |
last post by:
Hi,
I have a VB.NET application which includes several forms.
however,i need to know which form is opened and visible, like that i can actualize it. (typically dynamic changes of language...
|
by: MLH |
last post by:
A97
Am having difficulty displaying graph in Form View that I see fine
in graph control on form opened in design view. I know I'm doing
something wrong.
If I open the form in design view - I...
|
by: shyam |
last post by:
Hi All
I had raised a simillar query in an earlier post
...
|
by: sara |
last post by:
Hi -
I've looked at many posts, and cannot find the answer on this specific
problem.
I have several fields on a table, which I've defined as "Text", 3
characters, Format Yes/No (I picked up the...
|
by: sarahaman |
last post by:
hi all
i am new in oracle!
i made one simple form with report and i made one print button
with trigger.(when-button-pressed)
when i press the print button so its giving me whole data,i do not...
|
by: eneyardi |
last post by:
I can't see the layout view of the form anymore, i tried to look-up the report format but the allow layout view is selected as yes. But the Design and Print view of the report are available. Anyone...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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: 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...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |