Referenced memory Application Error - List Bos

G

Guest

I'm getting an application error on closing a form in Access2000 (Win2000 Pro, SQL Server 2000 back end, VB.net on same computer). It's happened before with list boxes on this form, and as soon as I remove the list boxes and code the error goes away. The error repeats exactly the same each time I close it

Error
Application Erro
The instruction at "0x30088859" referenced memory at "0x09e2068c". The memory could not be "read"

I searched through and found a few items I could attempt, and will be repairing Office right now. Any ideas?
 
G

Guest

It seems to be caused by my setting the RowSource property for the ListBox from VBA. I need to set the row source property from code, and this ends up generating an error. Is the form corrupt?
 
E

Elwin

I don't understand why you are setting a rowsource when
you close the form. Setting the rowsource property causes
the control to automatically requery itself. If you're
closing the form during the requery perhaps that's what is
giving you the problem. If your using the OnClose() event
to set the rowsource, try moving that part of your code to
the OnUnLoad() event, which fires first. Good luck.
-----Original Message-----
It seems to be caused by my setting the RowSource
property for the ListBox from VBA. I need to set the row
source property from code, and this ends up generating an
error. Is the form corrupt?
 
G

Guest

Actually, I'm setting the rowsource after I open the form and populate the filter. The error occurs when I close the form. If I take out the following code

me.desclist.rowsource = "EXEC proc....... filter1, filter2
me.desclist.requer

Then I don't get the error

If I set the rowsource in the control during design I have no problems, but then I don't get the ability to include the store procedure parameters. The point is that THIS SHOULD WORK!!! And it does, at least until I close the form. Last night I took the (very fun) step of rebuilding the form from scratch and this seemed to solve the problem, until I just tried it and again the error occured. This seems like a bug issue to me.
 
G

Guest

I just found article "Microsoft Knowledge Base Article - 201962" that shows something similar happening in Access 97 when you change the RowSourceType property in code. Interestingly, I haven't changed this property. I've got it set to View/StoredProcedure and I keep it there. I also have tried with using a ValueList RowSourceType populated from a getstring of the desired recordset instead of a direct command. Still not getting it...
 
E

Elwin

Sadly, I know nothing of stored procedures. I usually use
a SELECT query as my RowSource, and Table/Query as my
RowSourcetype. I suggest starting a new post, but include
more detail about what events are firing, the specific
code, and how you're connecting to your data. Good luck.
-----Original Message-----
I just found article "Microsoft Knowledge Base Article -
201962" that shows something similar happening in Access
97 when you change the RowSourceType property in code.
Interestingly, I haven't changed this property. I've got
it set to View/StoredProcedure and I keep it there. I
also have tried with using a ValueList RowSourceType
populated from a getstring of the desired recordset
instead of a direct command. Still not getting it...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top