Which query is being used by which form/report?

Is there any way to find out whether a query is being used, and by which 
reports or forms?

Thanks,
Dean S

0
Dean
10/12/2007 1:46:01 AM
access.forms 6864 articles. 2 followers. Follow

1 Replies
1607 Views

Similar Articles

[PageSpeed] 49

This will list the RecordSource property of your forms and reports:

Public Function ShowSources()
    Dim accObj As AccessObject
    Dim strDoc As String

    For Each accObj In CurrentProject.AllForms
        strDoc = accObj.Name
        DoCmd.OpenForm strDoc, acDesign, WindowMode:=acHidden
        Debug.Print strDoc, Forms(strDoc).RecordSource
        DoCmd.Close acForm, strDoc
    Next

    For Each accObj In CurrentProject.AllReports
        strDoc = accObj.Name
        DoCmd.OpenReport strDoc, acDesign, WindowMode:=acHidden
        Debug.Print strDoc, Reports(strDoc).RecordSource
        DoCmd.Close acReport, strDoc
    Next
End Function

If you are interested in tracking down where a particular field is used, 
this code will do it:
    http://allenbrowne.com/ser-73.html

There's also a utility by Chas Dillon to rename fields and trace 
dependencies here:
    http://allenbrowne.com/ser-41.html

Access 2003 and 2007 have the ability to trace dependencies, but that relies 
on Name AutoCorrect. My experience is that where there are some invalid 
sources (e.g. referring to fields/tables that no longer exist in the 
database), it just crashes Access so is not usable.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dean Slindee" <slindee@charter.net> wrote in message
news:1D2104F5-8A98-41D1-80A0-579283C524D6@microsoft.com...
> Is there any way to find out whether a query is being used, and by which 
> reports or forms?
>
> Thanks,
> Dean S 

0
Allen
10/12/2007 2:04:29 AM
Reply:

Similar Artilces:

Report Not Printing
We are running version 3.0 of CRM and I have one workstation that cannot print reports presently. My workstation works fine so far it seems only isolated to the one workstation. What happens is they get the report up on the screen but when they hit the print button they get an error on page. The details on the error are similar to below. Line: 20 Char: 4 Error: Object doesn't support this property or method Code: 0 URL: http://ddcrm/ReportServer?%2fDesigner+Doors_MSCRM% 2fCustomer+Acceptance+Resolved+Issues&Resolveddate=10%2f1% 2f08&rs%3aCommand=Get&rc% 3aGetImage=8.00.1...

Reason Code Report #2
I sell a perishable product, therefore I need to be able to track product that has perished. In the help menu, under reason codes, it states, the information is stored for use in tracking and reporting. That is why I chose this method to record dead plants. Now I need to know the cost and profit lost of these dead plants, as well, I don't want to purchase them again. So how do I get the information???? I read about a guy tracking dead fish by making the item inactive, although he was having trouble, should I change how I track this info for the future? I would greatly appreciate h...

Inventory Transactions using Integration Manager
Hi I am trying to import inventory transactions (adjustmnet) using the IM, the key thing is I want all lines in a single transaction. I memic the sample in IM. but its not working imports all linesbut I am getting this error: Object 'Adjustment 1' already exists -- cannot Insert. I think the problem is related to te documnet number, I am using a cloumn that conatains the same number for all rows (in order to import all the lines in a single trx) Am I missing anything? any hint? Thanks Look at the "group by" function in the IM manual. An import will consist of hea...

CRM v1.2 Report Manager Problem
Hi all, I am having a problem with Report Manager after having reinstalled the MS CRM on the CRM Server. When I logged in using Report Manager, it stated that the "CRM folder does not exist!" I can run all other CRM services fine but with this error I cannot publish all of my reports and hence keep getting the Crystal Report Logon Error. I am stuck to this problem for so long and still have no solution to it... I tried to delete and rebuild the APS database, uninstalled CRM then go into the registry to delete all crystal related values, everything I can digged out from the internet...

XP Style button using MFC 4.2
Hi, I am using Visual C++ 6, MFC 4.2. Windows XP SP2. My problem is, how could I get the XP Style buttons on the dialog. If i dynamically create the button using CreateWindow() the button still looks same. I've tried 'Button Controls' article on MSDN but no luck. Could anyone help me? Thanks, Fahad Themes are handled by the system, and not on a button-basis. The way to give your application running on XP the themed look is to include a manifest resource. The resource can either be a resource compiled into your EXE or it can be a separate file in the same directory as your ...

how to make a query to find the company with large number of selli
Hi I have two tables, one for the companies' info and one for t selling In the selling table there is data for customers, companies, prices etc. What I want to do is making a query to know which company has the large No. of selling. Can any body help me plzzzz What do you mean by "which company has the large No. of selling"? Most sales? Largest dollar amounts? Most items? In other words, which field determines "large"? -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "ghost" wrote: > Hi &g...

Realized gain/loss in Money 2002 Reports
I am entering my investment data into money '02 and have been looking at some of reports that it provides. In the "performance by investment account report" it shows that for one of my investments the realized gain is $18.45. THIS IS FALSE as i have been keeping everything in Excel spreadsheets. In the register section of the investment I entered a sell with a $218.45 gain. I am entering all data into the register (activity,# of shares, price, total)Money knows what i paid for the inv. and what i sold it for. This is not the only inv. it is doing this to. Is there a fix or...

Form Size and Scroll Bars
Hello All, We have added a number of fields to the opportunity form. For some reason when the form loads the scroll bar goes all the way to the bottom of the form and the user has to scroll back up to the top of it. Any ideas why this might be happening? Thanks! Hi, Check out JScript in your onload event of opportunity. Is there any code which is moving the focuss to some field at bottom of form? -- PLEASE do click on Yes or No button if this post is helpful or not for our feedback. uMar Khan :: Freelance Consultant Email Contact :: imumar at gmail dot com "MDV1457" w...

Backordered Item Received Report from Transfer
Is there a report similar to the POP Backordered Items Received Report that one can run after transferring inventory into a warehouse location? We would like to use assembly transactions, but not sure how to get this visibility if we don't receive into the warehouse location. Thanks, Barbara Behen Hi Bdehen There is no canned report that will give you this information. This would be a report you would have to create. Regards, Jason -- This posting is provided "AS IS" with no warranties and confers no rights. "Bbehen" wrote: > Is there a report sim...

Limit record count in query
Hello all, I have a query that will return over 65K records (rows). My end goal is to export this to Excel via code. Excel has a limit of 65K rows on a single tab. So, 65K to tab1, the rest of the records to tab2. I figured I would have query1 that would limit the results to 65K, and query2 that would start at 65K +1 to the end. How can I limit query1 to 65K and query2 to start at 65K +1? I'm not sure how efficient this will be but you could try: SELECT TOP 65000 * FROM [query that will return over 65K records] ORDER BY PrimaryKeyField; and SELECT * FROM [query that will retu...

Using VBA to change Excel layouts
Our company has designed 4 different spreadsheet designs. The same data gets stored in any of the 4 spreadsheet layouts....the only difference is that some spreadsheets use different colors, have different fonts and cell sizes and etc... I thought it would be nice to create just ONE spreadsheet that contains a combo-box or list-box or drop-down box which allows the user to select 1 of the 4 layout choices, then I want VBA to programattically setup the spreadsheet layout according to the users choice. Does that make sense? Does anybody know any good ways to implement something lik...

USING DATES IN FORMULAS #2
I foubd a problem with excel 2003 If you introduce a formula using dates (in spanish version) (dd/mm/yy), excel doesnt makes the calculation........... ???? Can somebody hep me In the USA version (English), I could use: =if(a1=date(2005,10,27),"It's Oct 27, 2005","it's not") to refer to a date. I don't know what the Spanish function is for =date(), though. Carlos Benavides wrote: > > I foubd a problem with excel 2003 > If you introduce a formula using dates (in spanish version) (dd/mm/yy), > excel doesnt makes the calculation........... ????...

How do I use a pivot table to get an average count? #2
I have a list of transactions with colum headers of Month, Date, Weekday, Time and the transaction data. I would like to see the average number of transaction per hour per day. Can this be done in a pivot table? ...

Error on Importing Access Query
I am trying to import Access Query to Excel so I can generate pivot table and chart with live data. However importing external data reads column header only, no values. I have done this before, a while ago. I don't understand why this is not working. Can somebody help me? ...

Only The Report Header Is Printing
I use an Access application here at work, which includes a button on a form to print a report. When I try to print the report nothing comes out but the header of the report. I'm very new to using Access and really don't know the ins and outs of it at all. I have looked in a couple of different Access training books, but I don't know what I'm really looking for. I'm frustated and need help. Does the report have a RecordSource? A table or query that is providing the data to the report? Do you have controls on the report that are bound to fields in that RecordSource table...

When collecting data by using e-mail messages
I'm getting the Warning message - these email messages might contain data that is of a confidential or sensitive nature - and it's not giving me access to the Create button in the wizard. The suggestion is to remove any fields in my message that might contain the confidential data, but there are none. How do I get around this? -- boniG When I said "there are none", I meant that none of the fields contain data of a sensitive or confidential nature. I even tried removing every field except the very first one which is simply a text field with the identificat...

continually getting send/receive errors using outlook 2002
Does anyone know why I am continually getting send/receive errors when trying to send an e-mail. I can receive e-mails from virtually anybody that is not blocked by Norton Anti-Spam(Norton Internet Security 2005). My account is a pop3 account with the 'Orange' mobile phone network, therefore it has an '@orange.net' address. I have tried 'repairing' outlook from add/remove programs - this did not fix the problem. Neither did uninstalling and re-installing (also from add/remove programs) this time it only allowed me to send a test e-mail to my '@aol.com' ad...

execute FireOnChange() from another Form
can i execute a FireOnChange event on a field from a another form? For example: In the OnSave() event from QuoteProduct form, execute the FireOnChange() event of the totalamount field in the Quote Form Thanks Enrique This is not support "out of box". Try Server SDK, pre/post callouts. Frank Lee Workopia, Inc. http://www.workopia.com/Links.htm "Enrique Bravo" wrote: > can i execute a FireOnChange event on a field from a another form? > > For example: > In the OnSave() event from QuoteProduct form, execute the FireOnChange() > event of the totalamoun...

How can I use wildcards in IF statements and Macros
I want to include in a Macro, something to take a particular action if the active cell contains text beginning with X. I thought something based on an IF statement, that included a wildcard, might work, e.g. IF(A1="X*,1,0). This does not work though. Sub JustDoIt() Dim s As String s = ActiveCell.Value If Left(x, 1) = "X" Then MsgBox "We should do something" End If End Sub -- Gary''s Student - gsnu200909 "AlanF" wrote: > I want to include in a Macro, something to take a particular action if the > active cell conta...

Form Name as Variable
Hi, I have the following subroutine: Public Sub SetMeterBasic(p As Single) ' This subprocedure is used to update the progress meter bar With Forms![FormA] .shpMeterBar.Width = p * .lblMeter.Width .lblMeter.Caption = Format(p, "##%") .Repaint End With End Sub FormA is a form from which I called the main subroutine of the program which then later called this procedure. Is there a way I can pass a form name to Sub SetMeter e.g. so its first line is Public Sub SetMeterBasic(p As Single, FormName as String) where the variable FormName can function as &...

Sharepoint list using using Issue "Created at" in calculations
We are using SharePoint at work. I currently have a list that I use the following Calculation to indicate how long an event have been open. =DATEDIF(Date,"1/4/2010","d"), however I would like to key on the Item “Created at” that is stored for each item. Does anyone know how to pint to that within a calculation. The result would be it has been 15 days since a list item was opened. ...

Can I start a macro using a # key?
Hi all can anyone help me with starting a macro called "gsw" by using the # or | or ~ key? The reason being I am trying to activate this macro by barcode scan and I cannot print a barcode using ctrl + X TIA Check out the OnKey method in help. Sub DoKeyAssign() Application.OnKey "#", "gsw" End Sub Sub gsw() MsgBox "Hello!" End Sub -- Jim Rech Excel MVP ...

making a chnge in a report
i have a report and that report imports other data it is abotu 160 pages and ther are abotu 5 pages that i need to make changes in how do i do that in access? Revise the data that feeds the report. -- Build a little, test a little. "Meca Lee" wrote: > i have a report and that report imports other data it is abotu 160 pages and > ther are abotu 5 pages that i need to make changes in how do i do that in > access? > > ...

Some Public Folder mails not visible using IMAP
Windows 2000 SP4 server/Exchange 2003 SP Strange thing happened yesterday. In the the course of 2 minutes about 200 mails appeared in one of our Public Folders, mails which had been received earlier into one of the other Public folders. All the mails have correct sender/receiver/subject but have blank messages. The receiving dates have been changed to yesterday's date, but looking at the details in Outlook these mails were all first received on Jan 6, 2006. Even stranger is that when viewed using IMAP these mails are not visible, but using OWA or Outlook in Corporate mode, they are visib...

Form fields vs. document properties
I'm creating common templates for multiple dealers of the same product. For example, one dealer may open my "Client Guide" document and all he needs to do is update approximately 20 fields and he is done. I'm using the standard document properties fields for my company information, but there are 10+ more unique fields I need to do this for. I've been trying all night to use quick parts, building blocks, etc. to accomplish this but I am really struggling. I can use a fill-in field, but it prompts for the field every place I use it. I've enabled th...