Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002
    Location
    Oakland, CA
    Posts
    126

    Arrow Unanswered: Figuring out the source/links of DB

    This is actually three questions in one and will be easy to answer for local masters of Access. So
    1. How can I find out where from are tables in my DB linked from?
    2. Similarly, looking at a report, how can I find out what query/table is used for that report (I do it opening the field list..., is there a better way?)?
    3. Is my actual problem that can be solved by applying (I guess) from answer to my 1st question. Here are the steps
    - I open a DB
    - I get an error message: "The required file "..." could not be found. You can use the next dialog box to locate the file on your system."
    - Now I locate the file and everything works fine but I'm tired of that message. My guess is that I have to fix it in VB but I have no clue how. Thanks in advance, everybody

  2. #2
    Join Date
    Nov 2002
    Posts
    150

    Re: Figuring out the source/links of DB

    Originally posted by vojtab
    This is actually three questions in one and will be easy to answer for local masters of Access. So
    1. How can I find out where from are tables in my DB linked from?
    2. Similarly, looking at a report, how can I find out what query/table is used for that report (I do it opening the field list..., is there a better way?)?
    3. Is my actual problem that can be solved by applying (I guess) from answer to my 1st question. Here are the steps
    - I open a DB
    - I get an error message: "The required file "..." could not be found. You can use the next dialog box to locate the file on your system."
    - Now I locate the file and everything works fine but I'm tired of that message. My guess is that I have to fix it in VB but I have no clue how. Thanks in advance, everybody
    1. Goto Tools/Option and check the System Objects checkbox. Open the MySysObjects table and look for items that have a value in Connect. This will tell you the DSN or Access DB.
    2. Open a report in design view, goto properties, and look at the Record Source.
    3. Probably something in code looking for a table to exist in a certain location. Goto Tool/Options and select the Advanced tab. Click on "Break on All Errors". Select OK. Close Access and repoen your database. The system should goto the line of code that is erroring.

    If you are not comfortable with Access, be careful doing any of the things I mentioned.

  3. #3
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251
    in VBA ....

    1.
    currentdb.TableDefs("MyTable").Properties(4)
    or
    currentdb.TableDefs("MyTable").Connect

    this gives you connection string, you can separate it taking everything after word DATABASE=


    2. you can get reports' names from Container, but if you want to see recordset, you have to open it.

    ' you can go through all reports even if you don't know the name...

    myReportName = CurrentDb.Containers("reports").Documents(0).Prope rties(0)

    DoCmd.OpenReport myReportName, acViewDesign
    MsgBox Reports(myReportName).RecordSource
    DoCmd.Close acReport, myReportName



    3. look at CONNECT TableDef property in Access HELP - there is an example....


    :-)
    jiri

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •