OLE Issue and No Solution Can Be FOund

skilche1

Registered User.
Local time
Today, 00:00
Joined
Apr 29, 2003
Messages
226
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?

ole.01.jpg


ole.02.jpg


ole.03.jpg


ole.04.jpg


Thank you!
 
Using reserved words like Date for object or field name is asking for trouble. Here is a list of reserved words: http://allenbrowne.com/AppIssueBadWord.html

There are occasions where Access gets confused and throws error messages that have nothign to do with anything. In such instances I narrow down what made Access freak by removing code until the error is gone.

Instead of pasting screenshots of queries, paste the SQL. Select the SQL view in the query builder and copy/paste the code.
 
Gotcha, I will try renaming Date to somthing like, "CauseDate".

Thanks man, appreciate your help. Fingers crossed....
 
OK, changed the Date to "DateCaught". Still get the same error. I also removed the # sign as well. Forgot about that.
 
Oddly, when I go into the form after the error messages, I select the Category and my date criteria, run the query and I get the results I am looking for...
 
This type of error messages can come from weridest causes: messing up function, form or control names and in general contravening rules that can only be checked at runtime. To zoom in on it remove bits of code until the error is gone. Btw: did you try to compile your db? In the code window, go to Debug-> Compile.
 
This type of error messages can come from weridest causes: messing up function, form or control names and in general contravening rules that can only be checked at runtime. To zoom in on it remove bits of code until the error is gone. Btw: did you try to compile your db? In the code window, go to Debug-> Compile.

I have tried everything under the sun that I am capable of doing... As for debugging, it work perfectly when I run the query, not sure if debugging will help.

You're more than welcome to take a peek at it. See attached db.
 

Attachments

Gee thanks.

First, in the code window, go to Debug and press Compile.
 
Hmm, problem number one is you are requerying the chart on open of the Form when there is no data entered into your fields. I would remove that one and just leave the one in the after update of the combo box.
 
Hmm, problem number one is you are requerying the chart on open of the Form when there is no data entered into your fields. I would remove that one and just leave the one in the after update of the combo box.

That was on After Update, not on Open...
 
Let me check again because I saw one in the On_Open event (or maybe I needed more coffee) :rolleyes:
 
I meant OnLoad, but I have that frmQaulityCatches (data entry form). I hear you. I have a big cup of java. :)
 
I suspect the thing hates parameters - it cannot interpret them. As test: make a copy, and then hardcode some values in the queries that you know will give results. If that works, then you need to redefine the queries with the values of the parameters using the QueryDef object, or rewrite the queries from scratch, with the parameter valsues, and bind the graph to that.
 
Okay, (she says with coffee in hand)... (Misread the On_Open event)

spikepl is correct, the chart needs parameters as it's attached to a query that is *linked* to the Form. So, either open the Form with *default* values in the field or you may have to set the Source of the chart after the Form has been open.
 
I suspect the thing hates parameters - it cannot interpret them. As test: make a copy, and then hardcode some values in the queries that you know will give results. If that works, then you need to redefine the queries with the values of the parameters using the QueryDef object, or rewrite the queries from scratch, with the parameter valsues, and bind the graph to that.

Okay, (she says with coffee in hand)... (Misread the On_Open event)

spikepl is correct, the chart needs parameters as it's attached to a query that is *linked* to the Form. So, either open the Form with *default* values in the field or you may have to set the Source of the chart after the Form has been open.


OK, I have never had to do this. How would I go about doing this and is this something I will have to do is I try to run a query for a Chart and Report that I want to develop?

Thank you,
Steve
 
Last edited:
Why is it that all of a sudden, I need to use parameters when I didn't need to in the past? My data is pretty simple...
 
Well, before we get to the how... what has changed about this database? Version? Query? And it's not the data that is the issue it is the query that can't feed the data to the Chart. I should also note, as I have not seen this problem prior having not it this way. we are thinking this might be the problem. You could fully test the theory by hard coding your query and see if the error goes away. If yes then you will need to adjust the way the Form with Chart opens.
 
Well, before we get to the how... what has changed about this database? Version? Query? And it's not the data that is the issue it is the query that can't feed the data to the Chart. I should also note, as I have not seen this problem prior having not it this way. we are thinking this might be the problem. You could fully test the theory by hard coding your query and see if the error goes away. If yes then you will need to adjust the way the Form with Chart opens.

Actually, this is a new development, not an existing db. Honestly, it''s been a few years since I have created on and hard coding isn't my thing... I have built many databases in the past where the data was more complex. However, when I look at them, I see I have set them exactly in the same manor. Why this happening now is baffling.

Because of this problem, I have started a new one from scratch and I am still having the same issues, the dang OLE error and it's starting to get the best of me.

Let me ask you this if I may... Would it have to with the way I am importing the actual catches from an excel file? That is the only thing that comes to mind. I am confused and frustrated...
 
Last edited:

Users who are viewing this thread

Back
Top Bottom