Results 1 to 15 of 15
  1. #1
    Exadd is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2012
    Posts
    12

    Unable to get data from linked tables coming from 6 diffrent databases.


    Ms access 2003 db is linked to other 6 ms 03 databases. The input of data is done on this 6 ms db however on a module where all 6 is linked this is what is there when logging in to the database
    Code:
    Option Compare Database
    Option Explicit
    
    Function Reset_Database()
    Dim vAsk 
    vAsk = MsgBox("Do you wish to reload the updates from the server? Do this if new employees have just been added. This might take a while.", vbCritical + vbYesNo, "Employee Database") 
    If vAsk = 6 Then 
    DoCmd.SetWarnings False Screen.MousePointer = 11 
    DoCmd.OpenQuery "qry_admin" 
    DoCmd.OpenQuery "qry_hargyp" 
    DoCmd.OpenQuery "qry_navomill" 
    DoCmd.OpenQuery "qry_navoplant" 
    DoCmd.OpenQuery "qry_senior" ' ADDED JULY 16, 2009 FOR VWS 
    DoCmd.OpenQuery "qry_NAVOVWS" 
    DoCmd.OpenQuery "qry_tfr_estate" 
    DoCmd.OpenQuery "qry_tfr_division" 
    DoCmd.OpenQuery "qry_tfr_section" 
    DoCmd.OpenQuery "qry_jobtitle" 
    DoCmd.OpenQuery "qry_jobtitle2" 
    Screen.MousePointer = 0 
    DoCmd.SetWarnings True 
    End If 
    DoCmd.OpenForm "frmemployee"
    End Function
    I've checked the database and its query stated above for 2 weeks now and can't see anything wrong with it but still I'm unable to get update. This has been working so well for the past 3 years, last year we had a similar problem so I just copied across the module from a back up copy to this one but for now the back up copy of this modules are not working also. Please assist as I'm so so lost for now.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Have you tried a compact and repair?

  3. #3
    Exadd is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2012
    Posts
    12
    I tried compact and repair but still getting the same response.When clicking the yes button of getting update from the server it just hangs forever.Is there any other solution to fix that?

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    My only other suggestion is to create a new database and import all the tables, queries, forms, modules, etc into the new database. Sometimes, databases become corrupt and this is the only means to fix it. Short of that, I am out of answers. Perhaps, someone else will come to the rescue if this does not work.

  5. #5
    Exadd is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2012
    Posts
    12
    I've created a new db and transfered everything to a new one.Run the queries again to append data from the other 6 database to that of this new 1 and when clicked to Yes button for getting update from server, I manage to get 5 db data reflecting Ok on this new 1 however theres this query name "qr_navoplant" result came back as 'Record Deleted'.I've checked through the modules and i can see the 'qr_navoplant' is also mentioned in there.I've recreated qr_navoplant rerun it and it is the same.Am i missing something?

  6. #6
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Do you have the spelling correct. In your code you have the query listed as qry_navoplant yet in your thread #5 you refer to qr_navoplant. Are they the same, is this a typo.

  7. #7
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    One thing I might suggest is that instead of using DoCmd.openquery, use
    db.execute queryname, dbfailonerror

    This will cause any query that has a problem to generate an error message, which will at least tell you where to look.

    HTH

    John

  8. #8
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    And remove any line that has to do with "DoCmd.SetWarnings"


    Maybe post your mdb? Do a compact and repair, then zip it.......

  9. #9
    Exadd is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2012
    Posts
    12
    Hi, I'm attaching the example db.I've tried and tried but still getting the same message 'record delete' so i'm putting my faith to the experts now.

  10. #10
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Don't see any attachment...?????

  11. #11
    Exadd is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2012
    Posts
    12
    Hi sorry all once again can someone have a look at the db and tell me what exactly is wrong.Sorry i went on leave and never replied to this.Your assistance will be greatly appreciated.
    Attached Files Attached Files

  12. #12
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    It's difficult to diagnose without access to all those other databases, because the query design views don't work (!). Are you able to determine which query is causing the problems?

    The problem may not in fact be with this database at all - it might be one of the other 6 you are linked to that is corrupted. Did you open each of them individually to see if they are OK? Do a Compact and Repair on each (Make a backup first!!!) to see if that helps.

    John

  13. #13
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    Another suggestion. As I have pointed out, the way you are running the queries in you code will not generate an error message if one of them encounters a problem - it may just send the whole process off into never-never land (as you have discovered!). Did you try running running each query individually, outside the code? They appear to be ordinary append queries with no dependence on form values.

    And that brings up another question - since they are append queries, might there be a problem with the data being appended, that causes a key or index violation? Running the queries outside of the form code will help with that possible problem.

    John

  14. #14
    Exadd is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2012
    Posts
    12

    Thumbs up

    Thanks for your reply what I did back here after looking at John's suggestion about the data I went back copied across tables and query using ms access 03 in one of this linked db to new db and did compact and repair on that new database.

    Found the append query that was giving us problem if you look at the example it was append query name "QRY_NavoPlant" so reran the append query and the data is now populated under table TPM_personal ..

    Thanks for all your ideas and assistance you may close this thread as the problem was rectified.THANK TO THOSE WHO HAVE SHARED THEIR knowledge on access with me.

  15. #15
    Exadd is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2012
    Posts
    12
    Thank you all this was solved but forget to close it..Thanks for your input

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

Similar Threads

  1. Replies: 5
    Last Post: 02-02-2012, 06:42 PM
  2. Split Multiple Linked Databases
    By sifar786 in forum Database Design
    Replies: 0
    Last Post: 12-11-2011, 03:26 AM
  3. Replies: 2
    Last Post: 11-05-2010, 04:47 AM
  4. Replies: 2
    Last Post: 09-01-2010, 09:51 PM
  5. Converting/Upsizing Linked Databases
    By Chaz88 in forum Import/Export Data
    Replies: 2
    Last Post: 08-11-2010, 06:46 PM

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