Avatar billede nyholm Novice
15. september 2005 - 12:16 Der er 7 kommentarer og
1 løsning

Problems with version of Ms Access

After importing data to my db I have to convert some of the data.
A form handles the converting. When one record is done it goes to the next one and does the same. This can go on up to 10050 records, but then the db freezes. The od thing is that this only happens in access 2003, but not when I'm running the db in access 2000. What is the problem and how can it be solved?
Avatar billede bufferzone Praktikant
15. september 2005 - 12:25 #1
You will often find problems with different versions of access, one of the issues is scripting language. It seems to change from danish to english every other version.

The reason your database freezes coulbd be problems with the danish æ,ø and å. and one solution might be to remove these form the base. I think this could be done with a script.
Avatar billede nyholm Novice
15. september 2005 - 14:11 #2
Hi bufferzone!
Your suggestion can not be the case. I have the swedish wersions of Access 2000 and 2003 and the swedish version of XP professional. Why does the first 10049 records go well? Another od thing is that if I first run, let's say 8000 records and then starts a new session of converting, it stops after 2050. I know that if I open a table and want so seek and replace, I can only do this with 9000 records at the time. I can change the MaxLocksPerFile value in the register to a higher value and then I can seek and replace the amount of records up to the new value.
Does my problem have to do with something simular?
Avatar billede terry Ekspert
15. september 2005 - 19:04 #3
can we see the code which you are using to convert?
Avatar billede nyholm Novice
15. september 2005 - 20:29 #4
This is the code I'm using:
Private Sub Convert_Click()
    On Error GoTo Err_Konvert
   
TopNyResapost:
        If (Forms!ResapostUnderforms!Nr > 0) Then
        GoTo TopResapost
        Else
        MsgBox "Konverteringen är klar"
        DoCmd.Close acForm, "Resapost"
        Exit Sub
        End If
TopResapost:
            Forms.Resapost.StartDat = Left(Forms.Resapost.DatStart, 4) & "-" & Mid(Forms.Resapost.DatStart, 5, 2) & "-" & Mid(Forms.Resapost.DatStart, 7, 2)
            Forms.Resapost.StartKl = Left(Forms.Resapost.TidStart, 2) & ":" & Mid(Forms.Resapost.TidStart, 3, 2)
            Forms.Resapost.SlutDat = Left(Forms.Resapost.DatSlut, 4) & "-" & Mid(Forms.Resapost.DatSlut, 5, 2) & "-" & Mid(Forms.Resapost.DatSlut, 7, 2)
            Forms.Resapost.SlutKl = Left(Forms.Resapost.TidSlut, 2) & ":" & Mid(Forms.Resapost.TidSlut, 3, 2)
            Forms.Resapost.Konv = 1

            DoCmd.Close acForm, "ResapostUnderforms"
            DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
            DoCmd.OpenForm "ResapostUnderforms", acNormal, , , acEdit, acHidden
        If (Forms.ResapostUnderforms.Nr > 0) Then
        DoCmd.GoToRecord acForm, "Resapost", acNext
        End If
       
        GoTo TopNyResapost
 
Exit_Konvert:
    Exit Sub
   
Err_Konvert:
            MsgBox Err.Description
        Resume Exit_Konvert

End Sub
Avatar billede terry Ekspert
15. september 2005 - 21:13 #5
I think you have a much better chance of updating the records in an update query. This would allow you to update all records in one go.

Just create a new query adding the table you want to update. Then choose Update query from the Query menu. Add the fields you want to update, and then in th eUpdate To field add the value you want to update to. For example


Left([DatStart],4) & "-" & Mid([DatStart],5,2) & "-" & Mid([DatStart],7,2)
Avatar billede terry Ekspert
15. september 2005 - 21:13 #6
and you may need to replace , with ;
Avatar billede terry Ekspert
16. september 2005 - 12:14 #7
thanks, hope it helped.

og god weekend
Avatar billede nyholm Novice
16. september 2005 - 12:38 #8
Yes, I have changed to an update question. Thanks for the idea.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester