Results 1 to 15 of 15
  1. #1
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229

    Link Tables Not Refreshing

    I created a blank database and linked to a few tables from a secure database, in order to let users access some custom queries and reports. However, I find that the linked tables do NOT update automatically each time a query or report is clicked, the user has to open the tables in order to refresh them.
    Why is this happening? Aren't linked tables supposed to refresh automatically every time?


    Note: the source database is on a server location mapped to the local PC and does not require any password prompting.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What leads you to believe the tables are not updating?

  3. #3
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229
    When users call the report, it opens with the records to the date the report was last run. If the report was last run on Friday 31Dec, and they open it again Friday 3Jan, it will display records upto 31Dec; but after the table is refreshed, the report too will be updated.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What is the RecordSource of the Report?

  5. #5
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229
    A query that runs through four tables. The query has no direct parameters. The parameters are set from a report filter form prompting for Start and End dates.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What are you doing to "refresh" the tables?

  7. #7
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229
    Simply by opening the link table. It is very distressing!

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is the BackEnd Access? Can you show us the SQL for the "...query that runs through four tables"?

  9. #9
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229
    SELECT a.CHECKDATE, DEPARTMENTS.DEPTNAME, a.USERID, USERINFO.Name, Max(a.inTime) AS inTime, b.outTime,
    Format((b.outTime-intime),"Short Time") AS Duration
    FROM DEPARTMENTS
    INNER JOIN
    (
    (
    (SELECT DateValue(CHECKTIME) AS CHECKDATE, CHECKINOUT.USERID,
    CHECKINOUT.CHECKTIME AS inTime, CHECKINOUT.CHECKTYPE
    FROM CHECKINOUT
    WHERE (((CHECKINOUT.CHECKTYPE)="0"))
    )
    AS a
    INNER JOIN
    (
    SELECT DateValue(CHECKTIME) AS CHECKDATE, CHECKINOUT.USERID,
    CHECKINOUT.CHECKTIME AS outTime, CHECKINOUT.CHECKTYPE
    FROM CHECKINOUT
    WHERE (((CHECKINOUT.CHECKTYPE)="1"))
    )
    AS b
    ON (a.USERID=b.USERID) AND (a.CHECKDATE=b.CHECKDATE)
    )
    INNER JOIN USERINFO ON a.USERID=USERINFO.USERID
    )
    ON DEPARTMENTS.DEPTID=USERINFO.DEFAULTDEPTID
    WHERE (((a.inTime)<[b].[outtime]))
    GROUP BY a.CHECKDATE, DEPARTMENTS.DEPTNAME, a.USERID, USERINFO.Name, b.outTime;

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I see nothing in that query that would alter a table. What are you doing in the Report to request the Dates?

  11. #11
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229
    A form prompts users for Start Date and End Date values, clicking the OK button passes the parameters to the report.

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by goodguy View Post
    A form prompts users for Start Date and End Date values, clicking the OK button passes the parameters to the report.
    Is this done in the WhereCondition argument of the OpenReport command?

  13. #13
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229
    Yes. This is the command: (DoCmd.OpenReport "JobsReport", acViewPreview, , "outTime>=#" & (StartDate) & "# and outTime<= #" & (EndDate) & "#").

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The WhereCondition argument simply applies a filter to the RecordSource of the Report. I wonder if it is not updating the filter. It would be useful to run an intervening report with no WhereCondition argument and see what happens.

  15. #15
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229
    I will try and revert with the results.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-07-2010, 02:27 PM
  2. One-way link between tables
    By Mikele di Sagitter in forum Database Design
    Replies: 1
    Last Post: 07-23-2010, 08:26 AM
  3. How do I link existing tables?
    By jsbdiver in forum Programming
    Replies: 0
    Last Post: 05-24-2010, 02:53 PM
  4. Join three or more tables in many to many link
    By elicoten in forum Database Design
    Replies: 3
    Last Post: 02-04-2010, 06:51 PM
  5. Best way to link tables together?
    By marleyuk in forum Access
    Replies: 1
    Last Post: 06-07-2009, 08:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums