Thank all you folks for the input. The lessons are very hellpful. Since I am still in the initial development stage, I will probably take a new approach and rewrite this module completely using your pointers.
I may be a bit thick-headed but it appears the RefreshCache method is used in JRO which I know nothing about. Please enlighten me if I am wrong on this. I don't have the time to learn about JRO so I guess I will just have to insert the 1-second delay. Thank you for your help.
Sorry, I left two lines out of my first set of code:
After the "Do While" and before the "SQL =" I load two variables.
CurJob = RSmatl!Job_Code
CurItem = RSmatl!Item_No
There were three records in the RSmatl recordset and all three got inserted into the Materials table. But only two of them...
Actually, I tried the DoEvents with no success. Only a 1-second pause does the trick.
Thank you. I think my answer is in another forum where they talk about asyncronous database functions.
I am not creating code in Access. I am working with VB. I think I am in the wrong forum. I'll try "Visual Basic(Microsoft) Databases Forum".
Thanks anyway
I hope I am in the right forum.
I have a VB program that first clears an Access table. Then, using a recordset opened to another database, inserts several records into it.
Set WK = CreateWorkspace("", "admin", "", dbUseJet)
Set DB2 = WK.OpenDatabase(MasterFile)
SQL = "Delete * From Materials "...
I was transfered to this forum and hope I am in the right category.
I have a VB program that clears an Access table then, in a loop, inserts several records into it.
Set WK = CreateWorkspace("", "admin", "", dbUseJet)
Set DB2 = WK.OpenDatabase(MasterFile)
SQL = "Delete * From Materials "...
I am new to this forum and hope I am in the right category.
I have a program that clears an Access table then, in a loop, inserts several records into it.
SQL="Insert Into Materials (JobCode, Item)"
SQL=SQL & "Values ('" & CurJob & "','" & CurItem & "')"
DB2.Execute SQL...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.