I inhereted a rather extensive MS Access 2000 database (SQLServer 2000
backend)in adp format.
Is there a way to search the Access front end for references to
specific database objects?
Let's say there are 100 macros and I want to know if any of them use a
particular stored procedure. I'd hate to have to manually look in all
100 macros.
Or, suppose I wanted to see if a stored procedure was used as a
recordsource for any number of 100 or so reports. What's the most
efficient way of doing so?
Thanks for any light you can shed!
Matt 6 1435
"Matt" <mh******@yahoo .com> wrote in message
news:5f******** *************** **@posting.goog le.com I inhereted a rather extensive MS Access 2000 database (SQLServer 2000 backend)in adp format.
Is there a way to search the Access front end for references to specific database objects?
Let's say there are 100 macros and I want to know if any of them use a particular stored procedure. I'd hate to have to manually look in all 100 macros.
Or, suppose I wanted to see if a stored procedure was used as a recordsource for any number of 100 or so reports. What's the most efficient way of doing so?
Thanks for any light you can shed!
Matt
Does't SQL server show you the object dependancies? Open up the
Enterprise manager and check out the objects properties....
--
regards,
Bradley
"Bradley.-." wrote Does't SQL server show you the object dependancies? Open up the Enterprise manager and check out the objects properties....
SQL Server is unaware of Access reports, which were the subject of the
question.
"Larry Linson" <bo*****@localh ost.not> wrote in message
news:_l******** **********@nwrd dc02.gnilink.ne t "Bradley.-." wrote
> Does't SQL server show you the > object dependancies? Open up the > Enterprise manager and check out > the objects properties....
SQL Server is unaware of Access reports, which were the subject of the question.
That'll teach me for skimming the post ;)
--
regards,
Bradley
Yes, Access projects have an AllReports collection which you can "enumerate"
(loop through... you will have to open each Report in the collection in
Design View, however, to examine the RecordSource). And, remember that there
are multiple ways to specify the same thing: a table name, or an SQL
Statement that retrieves the information (which may refer to one or more
tables, and may retrieve all, or just some, of the fields).
I don't have an example for Reports, but here are pertinent statements from
an example that I used to go through the AllModules collection:
Dim obj1 As AccessObject, dbs1 As Object
Dim mod1 As Module, frm1 As Form
Set dbs1 = Application.Cur rentProject
For Each obj1 In dbs1.AllModules
If obj1.Name <> "basDesignTimeC ode" Then
If obj1.IsLoaded = True Then
... do something
Else
DoCmd.OpenModul e obj1.Name
CurrentObjectTy pe = obj1.Type
CurrentObjectNa me = obj1.Name
... do something
DoCmd.Close acModule, obj1.Name ', acSaveYes
End If
End If
Next obj1
I find it difficult to imagine anyone using Macros in an Access project. I
certainly don't have any examples using Macros -- an Access project is, by
my definition, a developed application and the only Macro I'd think about
using in a developed application would be AutoKeys. But, surely enough,
there is an AllMacros Collection and decent help on how to use it in Access
2002 (if you're using Access 2003, it may be more difficult to find the help
you need).
Larry Linson
Microsoft Access MVP
Larry Linson
Microsoft Access MVP
"Matt" <mh******@yahoo .com> wrote in message
news:5f******** *************** **@posting.goog le.com... I inhereted a rather extensive MS Access 2000 database (SQLServer 2000 backend)in adp format.
Is there a way to search the Access front end for references to specific database objects?
Let's say there are 100 macros and I want to know if any of them use a particular stored procedure. I'd hate to have to manually look in all 100 macros.
Or, suppose I wanted to see if a stored procedure was used as a recordsource for any number of 100 or so reports. What's the most efficient way of doing so?
Thanks for any light you can shed!
Matt
Thanks, Larry, for that insight. Your solution is not what I was
expecting, but will work just fine for my needs. I don't have an example for Reports, but here are pertinent statements from an example that I used to go through the AllModules collection:
Here is the code I used to enumerate the reports and obtain each
report's recordsource (pardon the adaption of your formatting, I
modified it to match our existing code):
Dim oObj As AccessObject
Dim oProject As Object
Set oProject = Application.Cur rentProject
For Each oObj In oProject.AllRep orts
DoCmd.OpenRepor t oObj.Name, acViewDesign
Debug.Print "Report: " & oObj.Name
Debug.Print Application.Rep orts(oObj.Name) .RecordSource
DoCmd.Close acReport, obj1.Name
Next oObj
I've actually gone a step further and imported this info into a
SQLServer table, so I can query against it using SQL. You've made my
job here much easier!
I find it difficult to imagine anyone using Macros in an Access project. I certainly don't have any examples using Macros -- an Access project is, by my definition, a developed application and the only Macro I'd think about using in a developed application would be AutoKeys. But, surely enough, there is an AllMacros Collection and decent help on how to use it in Access 2002 (if you're using Access 2003, it may be more difficult to find the help you need).
I had to jump thru a few hoops, but used similar code to that above
for the macros and was able to obtain the info I needed.
Hopefully without going to far OT, our database was developed here
over the last 4 or 5 years; the previous developer used quite a few
macros, mostly to export the output of stored procedures to Excel
spreadsheets. I've read that the main reason to avoid macros is
because of error handling. Understood. But using these "OutputTo"
macros is pretty straightforward- if they fail there is no "crash",
just a (rather scary, to the user) message box describing the problem.
But I am open to suggestions. If there is a better means of going
about this, please let me know and I will do some further research.
Thanks again for your help,
Matt
I use VBA code... you can do anything in VBA code that you can do in macros
(except AutoKeys), and you can include error handling. I don't argue that
there are no cases and places where macros can be productively used, but I
use code in all cases, for consistency.
In fact, the code I copied was from an assignment where I was
programmaticall y adding error handling to over 500 procedures in a large ADP
done by someone else who had omitted error handling -- which omission was
causing the client a good deal of trouble.
Larry Linson
Microsoft Access MVP
"Matt" <mh******@yahoo .com> wrote in message
news:5f******** *************** ***@posting.goo gle.com... Thanks, Larry, for that insight. Your solution is not what I was expecting, but will work just fine for my needs.
I don't have an example for Reports, but here are pertinent statements
from an example that I used to go through the AllModules collection:
Here is the code I used to enumerate the reports and obtain each report's recordsource (pardon the adaption of your formatting, I modified it to match our existing code):
Dim oObj As AccessObject Dim oProject As Object
Set oProject = Application.Cur rentProject
For Each oObj In oProject.AllRep orts DoCmd.OpenRepor t oObj.Name, acViewDesign Debug.Print "Report: " & oObj.Name Debug.Print Application.Rep orts(oObj.Name) .RecordSource DoCmd.Close acReport, obj1.Name Next oObj
I've actually gone a step further and imported this info into a SQLServer table, so I can query against it using SQL. You've made my job here much easier!
I find it difficult to imagine anyone using Macros in an Access project.
I certainly don't have any examples using Macros -- an Access project is,
by my definition, a developed application and the only Macro I'd think
about using in a developed application would be AutoKeys. But, surely enough, there is an AllMacros Collection and decent help on how to use it in
Access 2002 (if you're using Access 2003, it may be more difficult to find the
help you need).
I had to jump thru a few hoops, but used similar code to that above for the macros and was able to obtain the info I needed.
Hopefully without going to far OT, our database was developed here over the last 4 or 5 years; the previous developer used quite a few macros, mostly to export the output of stored procedures to Excel spreadsheets. I've read that the main reason to avoid macros is because of error handling. Understood. But using these "OutputTo" macros is pretty straightforward- if they fail there is no "crash", just a (rather scary, to the user) message box describing the problem. But I am open to suggestions. If there is a better means of going about this, please let me know and I will do some further research.
Thanks again for your help,
Matt This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: thechaosengine |
last post by:
Hi all,
I have a very general but quite significant question about objects.
My question is, when should I create them? I know thats a crap question so
let me explain a bit further.
Lets take an example of user management against a database. Things I might
like to do include:
|
by: David Wender |
last post by:
I want to create a dataview with a sort on multiple columns. However,
when I use FindRows, I only want to search some of the columns, not
all. Is this possible? I have not been able to make it happen.
Dim objKeys(2) as Object
objKeys(0) = "CL"
objKeys(2) = 4000
Dim posView As DataView = New DataView(posDS.Tables("Positions"), _
|
by: Geoff Jones |
last post by:
Hiya
I have a DataTable containing thousands of records. Each record has a
primary key field called "ID" and another field called "PRODUCT" I want to
retrieve the rows that satisy the following criteria:
I have a list of about 100 numbers which correspond to the ID field and also
another 40 say numbers corresponding to the numbers in the PRODUCT field. I
want to show the rows that correspond to both these criteria.
|
by: AAJ |
last post by:
Hi all
I have some objects that I add to an ArrayList. Each object is from the same
class and has methods etc. Each can be identified by a unique property, in
this case PK
e.g.
PK =1 for Instance1.PK
PK =2 for Instance2.PK
|
by: Henrik Goldman |
last post by:
I have a std::map which consist of time_t as first and an associated class
as second:
map<time_t, myclass>
I would like to do calculations (min and max values) for a set of 'second'
for a specific time range.
Given the fact that 'first' can hold any time I would like to do the
calculation based on values which falls within a range of e.g. yesterday
| |
by: Jordan S. |
last post by:
Using .NET 2.0 (C#) I'm writing a small app that will have a "Person" class
that exposes FirstName and LastName properties. At runtime, a "People"
collection will be populated with a few thousand "Person" objects.
I want to provide users with the ability to search for people by FirstName
and/or LastName.
My question: How can I enable users to search for people with the last name
of "De Leon". I cannot assume that my users know how to...
|
by: justobservant |
last post by:
When more than one keyword is typed into a search-query, most of the
search-results displayed indicate specified keywords scattered
throughout an entire website of content i.e., this is shown as three
bolded periods '...' in search-result listings.
Additionally, most content is outdated; as many users need up-to-date
content. Hence, filtering-through search-results becomes quite
cumbersome.
The newsgroup listings allow detailed...
|
by: Jess |
last post by:
Hello,
I learned that there are five kinds of static objects, namely
1. global objects
2. object defined in namespace scope
3. object declared static instead classes
4. objects declared static inside functions (i.e. local static
objects)
5. objects declared at file scope.
|
by: BobLewiston |
last post by:
The concept of delegates (references to methods) per se is new to me (although I used function pointers in C years ago), and although the literature acknowledges that there are significant differences between delegates and the use of pointers to objects, I'm nonetheless a little confused by how similar the syntax used for references to methods is to that used for references to objects.
Recently at a few different forums I posted a brief...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |