Error – 3085 DAO. Database – Undefined function ‘DSUM’ in expression [modified]
-
I am working with VB6 looking at an Access 97 database. What I am doing is converting VB5 code to VB6. I have come across a problem where the code creates a Query in the Access file, then assigns that query to a Recordset (I know the query is fine because when I run open it in Access it shows the desired results). The problem is with some DSum, DMin, and DMax statements in the Query. It assigns the Query to the Recordset with no problem (.Data1.RecordSource = "SELECT qryJCDSSchedLU1.* FROM qryJCDSSchedLU1 ") but then it runs a refresh (.Data1.Refresh) and then this gives an error. (Error – 3085 DOA. Database – Undefined function ‘DSUM’ in expression.) If I remove the DSum then it gives me this error on the DMin, and if I remove that it gives me the error on the DMax. This works just fine in VB5 but not in VB6. Can anyone give me any suggestions on what I need to do to fix this? Thanks in advance for any help that you can give.
modified on Thursday, January 31, 2008 3:21:19 PM
-
I am working with VB6 looking at an Access 97 database. What I am doing is converting VB5 code to VB6. I have come across a problem where the code creates a Query in the Access file, then assigns that query to a Recordset (I know the query is fine because when I run open it in Access it shows the desired results). The problem is with some DSum, DMin, and DMax statements in the Query. It assigns the Query to the Recordset with no problem (.Data1.RecordSource = "SELECT qryJCDSSchedLU1.* FROM qryJCDSSchedLU1 ") but then it runs a refresh (.Data1.Refresh) and then this gives an error. (Error – 3085 DOA. Database – Undefined function ‘DSUM’ in expression.) If I remove the DSum then it gives me this error on the DMin, and if I remove that it gives me the error on the DMax. This works just fine in VB5 but not in VB6. Can anyone give me any suggestions on what I need to do to fix this? Thanks in advance for any help that you can give.
modified on Thursday, January 31, 2008 3:21:19 PM
And here I thought we were using cutting edge technology. The temptation to be rude is sooo strong but I'll refrain. You are upgradeing from 5 to a product that is already retired and no longer supported. Why not move straight to .net you would get a lot more support and resources would be current. Take the opportunity to rewrite the app, upgrade your skills, produce a BETTER solution.
Never underestimate the power of human stupidity RAH
-
And here I thought we were using cutting edge technology. The temptation to be rude is sooo strong but I'll refrain. You are upgradeing from 5 to a product that is already retired and no longer supported. Why not move straight to .net you would get a lot more support and resources would be current. Take the opportunity to rewrite the app, upgrade your skills, produce a BETTER solution.
Never underestimate the power of human stupidity RAH
I am sorry I thought this form said Visual Basic / VB.Net which I thought meant that you could post any questions in here regarding Visual Basic. Can someone help me with the question that I posted? This is probably a very easy answer that others have come across in the past and know exactly how to handle it. I don't understand what drives some people to waste their time by going in and out of forums making stupid comments and judging others instead of helping that person with the situation at hand (do you really have to try and make others feel bad to make yourself feel better?). I don't think I have to justify the reason that I am converting to VB6 or what I plan to do with this code once it is in VB6.
Mycroft Holmes wrote:
The temptation to be rude is sooo strong but I'll refrain.
...right back at ya buddy!
-
I am sorry I thought this form said Visual Basic / VB.Net which I thought meant that you could post any questions in here regarding Visual Basic. Can someone help me with the question that I posted? This is probably a very easy answer that others have come across in the past and know exactly how to handle it. I don't understand what drives some people to waste their time by going in and out of forums making stupid comments and judging others instead of helping that person with the situation at hand (do you really have to try and make others feel bad to make yourself feel better?). I don't think I have to justify the reason that I am converting to VB6 or what I plan to do with this code once it is in VB6.
Mycroft Holmes wrote:
The temptation to be rude is sooo strong but I'll refrain.
...right back at ya buddy!
I don't have a problem with using the old stuff, but he is right in one sense. VB6 has been "officially" dead for over a year now. DAO (not DOA) has been dead for about 8 years now, I think. That being said, your support resources out on the web are dwindling fast. This[^] is about the best you're going to get.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
I don't have a problem with using the old stuff, but he is right in one sense. VB6 has been "officially" dead for over a year now. DAO (not DOA) has been dead for about 8 years now, I think. That being said, your support resources out on the web are dwindling fast. This[^] is about the best you're going to get.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Yes I agree that VB6 is "officially' dead. And I have no less than 3 other programs that are written in VB.net 2005. But for this project I have to convert it to VB6 before I can more forward to .Net and I have it at least 90 percent converted but there are several places in this code that uses the scenario that I presented in my question. That is why I am asking for help.
-
Yes I agree that VB6 is "officially' dead. And I have no less than 3 other programs that are written in VB.net 2005. But for this project I have to convert it to VB6 before I can more forward to .Net and I have it at least 90 percent converted but there are several places in this code that uses the scenario that I presented in my question. That is why I am asking for help.
I would think you will have to rewrite the query in Access to duplicate the results, I would guess that DSum is an Access specific function that is no longer supported by the later version of DOA. And yes the forum is for VB and you are correct to ask the ? here, however it stikes me as invalid to move from 5 to 6 before moving to .net, a waste of resources. I just hope it is not so you can use the upgrade wizard to get the app into .net!
Never underestimate the power of human stupidity RAH