Full Version: OLE Issue And No Solution Can Be Found
UtterAccess Forums > Microsoft® Access > Access Forms
Kilch
OK, I am trying to embed a chart in a form with the query looking up the Location and By Date I want to chart present. I Keep getting this error when the MS Access database engine does not recognize my criteria I set up in the query. I then hit "OK" and another error pops up stating an error occurred "..while sending data to the OLE server...". I cannot find a solution here or on the web.. I need some help!!!

I have opened up some of my old databases with similar criterias and they work fine.

Anyone with any ideas?







Thank you!
GroverParkGeorge
Unfortunately, that's not enough information to do much trouble-shooting with.

Perhaps it would be helpful to upload a copy of the accdb with any sensitive information removed so we can actually see the problem.

Thanks.
Kilch
That I can do. Not sure why the screenshots didn't come out, but here is the db, which is even better.

Thanks George.
GroverParkGeorge
In my testing, I found that the form opens with two unbound text controls empty. The query that is supposed to populate the chart object references those controls, so it fails because there are no values to reference. That, in turn, appears to cause the chart object to fail.

I think your solution is going to be making sure there are values to be referenced in that query, so the chart can continue to display.
Kilch
I understand what you're saying George, but I have other databases I have created the same way and I do not get that error message. This is getting irritating... I even re-installed Access 2010 to see if there was a conflict, no change. I am losing my mind over this!!!

The thing that perplexes me is that when I View the query, the data I am calling for appears when I have my search criteria updated. I don't get it. I am trying this on my work computer (different machine) and I still get this dang error!

Starting to wonder if I have to start developing this database fro scratch...
GroverParkGeorge
Unfortunately, though, I can only report what I saw.

"... the data I am calling for appears when I have my search criteria updated" and that, I think, is the problem.

The form opens with nothing in the two date controls. The query in the chart object fails because it references those controls. And that in turn appears to be the reason the OLE object raises an error.

Apparently there is something different happening here from your other forms that do work.
Kilch
Hi George,

If that is true, then do my older databases work the way they should? They are set up the same way...
GroverParkGeorge
I figured out the problem. It looks like it might have resulted from having lookup fields in your tables at some point.

You have a lookup table called tblQCatch in which you have TWO fields which are supposed to reflect the location of a Quality catch. One is the foreign key "Location_ID", the other is the text value "Location". Apparently the database either stores both values in these fields, or it resulted from a change to the table to remove the lookup field. That's not clear, but in either case, this is not a good design.

In the form, the combo box bound to the Location table used the LocationID for the bound field, not the Location text value, although your query references the Location text value, not the LocationID. This means the query can never match the combo box location.

This means the query never matches anything from the location combo box. The reference to the Begin and End dates also raises an error.

Outside the form, the query does return values once the date field values are entered and a value is selected in the combo box. Inside the graph object, though, it doesn't seem to be able to reference the forms controls.

It occurs to me to ask if this sample you uploaded is the same as the one in your production db, or did you update it for the upload?

It looks to me like the best option would be to recreate this form and the object in it. I'll continue trying to isolate the error, but it seems like it might be quicker to remake the form.
Kilch
QUOTE
In the form, the combo box bound to the Location table used the LocationID for the bound field, not the Location text value, although your query references the Location text value, not the LocationID. This means the query can never match the combo box location.


The reason why this was set up this was because int he frmQualityCatch form, I have the data selection by using a ListBox for Location Category. oh After update of that ListBox, I have it refresh the ComboBoxes Location and Catch. The problem I was having was after the Update, the product keys were showing when you selected each ComboBoxes. So I worked around it and where I am pulling the data for the ComboBoxes query and selecting the names and putting into the those fields in the Table.

Weird thing is, I never had these issues in the past when I made databases. I don't know if Access 2010/2014 made some changes to where it's more finicky or if it's data I had imported from Excel to my tblQCathces table. I don't expect it would be from importing...

I really appreciate your hepl and if you can find out anything, let me know. If you have any further questions, please help as I really need to this to work.

Thanks again,
Steve
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.