473,698 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Searching for DB Objects within an ADP

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
Nov 13 '05 #1
6 1433
"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
Nov 13 '05 #2
"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.
Nov 13 '05 #3
"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
Nov 13 '05 #4
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

Nov 13 '05 #5
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
Nov 13 '05 #6
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

Nov 13 '05 #7

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

Similar topics

11
1787
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:
5
8826
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"), _
33
2496
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.
6
1826
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
3
3537
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
4
1429
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...
5
2394
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...
14
6012
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.
2
1877
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...
0
8674
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, 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...
0
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9027
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8895
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,...
1
6518
isladogs
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...
0
5860
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
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...
2
2329
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
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...

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.