Erratic procedure that misbehaves

Thanks for answering my question.
Access does not work well with Wi-Fi. If anyone is editing data and the wireless connection is dropped, even for a short time, corruption will occur … and potentially code may not run reliably. Strongly recommend everyone uses a wired connection. If that's not possible then it would be better to use SQL Server for the BE database as that is able to handle dropped connections better
 
I am more than happy to tell you that the code now worked like a song.

I will now have to wait for some time to see whether the modified code executes its purpose consistently.

I am very appreciate to theDBguy. I thank you. How do I thank you officially ?
You just did. Glad to hear you got it to work. Good luck with your project.
 
Yes I had a look at the code. I do not understand it well. I need an explanation on how to put it in practice to solve my problems.
Thanks for answering my question.
Access does not work well with Wi-Fi. If anyone is editing data and the wireless connection is dropped, even for a short time, corruption will occur … and potentially code may not run reliably. Strongly recommend everyone uses a wired connection. If that's not possible then it would be better to use SQL Server for the BE database as that is able to handle dropped connections better
Thanks for this useful information. The thing is that if it were a WIFI issue the procedure would be interrupted. In fact one would not realize that the code did not run well. Only later one finds that part of the code ran and that part I mentioned did not as the relevant records did not update.

I will now wait to see whether I solve this problem with CurrentDB.execute instead of with DoCmd. RunSQL

Can theDBGuy please explain the code referred to in 11 for my education. Thanks.
 
Can theDBGuy please explain the code referred to in 11 for my education. Thanks.
Hi. My understanding was you used the function I mentioned and the error went away. Is that correct? If so, that function was a way to handle the parameters you have in your query. There are other ways to handle it, but that function sorts of an easy way to handle multiple situations. Take a look at the code within the function and let us know which line you need us to explain further. Cheers!
 
Did you try what I posted in #7:
Code:
StrSQL = "UPDATE tblservicelog SET tblservicelog.invoiceno =" & [Forms]![frmBilling]![paste_invoiceno] & ", tblservicelog.invoiced = true, tblservicelog.paid = true" _

& " WHERE (((tblservicelog.invoiced)=false) AND ((tblservicelog.hospno)='" & lista & "')AND ((tblservicelog.include)=True));"
 
Hi. My understanding was you used the function I mentioned and the error went away. Is that correct? If so, that function was a way to handle the parameters you have in your query. There are other ways to handle it, but that function sorts of an easy way to handle multiple situations. Take a look at the code within the function and let us know which line you need us to explain further. Cheers!


Thanks for your interest. The original problem is still outstanding. I had a long code which works well most of the time. I posted it in my first post. However at times a specific part of this code ( an update SQL statement) did not execute. The whole procedure ran to its termination and one only realizes that the data did not update, later. This is episodic and unpredictable.

I was advised to change DoCmd. RunSQL to CurrentDB.execute in that particular part of the code. I found difficulty with getting this to run. But with your help I got it going. Now I have to see whether this solves the original issue.

I thank you.
 

Users who are viewing this thread

Back
Top Bottom