By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,404 Members | 1,987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,404 IT Pros & Developers. It's quick & easy.

Empty Listbox crashing Access 2002 SP1

P: n/a
AAJ
Hi all

I have a listbox on a form. If I set its rowsource directly, and the
query in the rowsourse returns no data, then the displayed listbox is
empty (exactly as you would expect)

However....

If I programatically set the rowsource, and the query returns no
records then access completely crashes and switches its self off,
asking me if I want to send an error report.

Does anyone know why this is and how to get around it.

Also, does anyone know where can I get the latest service pack from, I
just tries microsofts site and it said the page was unavailable.

thanks

Andy

Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Download Sp3 for Office Xp from:
http://support.microsoft.com/kb/307841

Also download SP8 for JET 4 from:
http://support.microsoft.com/kb/239114

After you have installed both service packs, uncheck the Name AutoCorrect
boxes in Access under:
Tools | Options | General
Explanation of why:
http://allenbrowne.com/bug-03.html

Then compact the database:
Tools | Database Utilities | Compact

If the problem persists, try getting Access to rebuild the database for you,
by following the steps for the first symptom on this article:
Recovering from Corruption
at:
http://allenbrowne.com/ser-47.html

If you still have the problem after that, post the SQL statement you are
attempting to assign to the rowsource of the listbox, and tell us whether
there is any subform associated with this form.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"AAJ" <an********@fdtsolutions.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Hi all

I have a listbox on a form. If I set its rowsource directly, and the
query in the rowsourse returns no data, then the displayed listbox is
empty (exactly as you would expect)

However....

If I programatically set the rowsource, and the query returns no
records then access completely crashes and switches its self off,
asking me if I want to send an error report.

Does anyone know why this is and how to get around it.

Also, does anyone know where can I get the latest service pack from, I
just tries microsofts site and it said the page was unavailable.

thanks

Andy

Nov 13 '05 #2

P: n/a
AAJ
Many thanks

The SP seems to have stopped the crashing, but I'm still having a few
other little odd problems.

Its very strange, it all seems to be linked to the empty recordset and
the listbox, but I can't every remember having this problem before..

thanks for the help, there might well be another post today if I can't
fix the anomolies!!!

cheers

Andy

Nov 13 '05 #3

P: n/a
aaj
Incase its of interest to anyone, (and if anyone knows why I would be
interested in a reason)...

On the parent form (which is bound to a recordset), I had the allow
additions set to false as I would never be adding records from the parent.

In desperation I set it to true, and it seems to have solved the problem.

thanks again

Andy

"AAJ" <an********@fdtsolutions.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Many thanks

The SP seems to have stopped the crashing, but I'm still having a few
other little odd problems.

Its very strange, it all seems to be linked to the empty recordset and
the listbox, but I can't every remember having this problem before..

thanks for the help, there might well be another post today if I can't
fix the anomolies!!!

cheers

Andy

Nov 13 '05 #4

P: n/a
That's good news, Andy.

There is a subform here? I'll bet bananas to bottles that this is the know
issue with Access 2002 and 2003 where Access crashes if you do not have the
foreign key field represented by a text box in the subform.

Whatever field is named in the LinkChildFields property of the subform
control needs to be present as a text box in the subform. That way, thte
LinkChildFields property refers to an object of type Textbox, instead of an
object of type AccessField, and the problem disappears.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"aaj" <aa*@aaj.com> wrote in message
news:1109065085.ab87ad3fd70fc5912934aa7b8bf9790f@t eranews...
Incase its of interest to anyone, (and if anyone knows why I would be
interested in a reason)...

On the parent form (which is bound to a recordset), I had the allow
additions set to false as I would never be adding records from the parent.

In desperation I set it to true, and it seems to have solved the problem.

thanks again

Andy

"AAJ" <an********@fdtsolutions.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Many thanks

The SP seems to have stopped the crashing, but I'm still having a few
other little odd problems.

Its very strange, it all seems to be linked to the empty recordset and
the listbox, but I can't every remember having this problem before..

thanks for the help, there might well be another post today if I can't
fix the anomolies!!!

cheers

Andy

Nov 13 '05 #5

P: n/a
On Tue, 22 Feb 2005 23:55:12 +0800, Allen Browne
<Al*********@SeeSig.Invalid> wrote:
There is a subform here? I'll bet bananas to bottles

Bananas to Bottles???

Darryl Kerkeslager
Nov 13 '05 #6

P: n/a
aaj
Its was an odd one

just in case anyone is interested....

Its a simple main form that has some bound parent data. On this main form
is a list box and an image box (no subforms)

the list box is bound to a recordset of filenames, and it uses the listboxes
after update event to change the photo to the selected filename.

To add a new filename to the list box, a button is clicked,it runs an
update statement, then forces the listbox to requery, same goes for delete.

it worked fine while data exisited in the recordset the listbox is bound to,
but if the recordset had no data (i.e. no photos had been added) all the
objects on the ecreen (text boxes, inages, listboxes) just disappeared.
Before applying the SP it just crashed.

Anyways, installing the SP and setting the allow additions worked fine.

I am sure its similar to the subform problem you described below, because
the requery of the listbox is dependant on the key of the main form.

thanks for the help chaps

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:42***********************@per-qv1-newsreader-01.iinet.net.au...
That's good news, Andy.

There is a subform here? I'll bet bananas to bottles that this is the know
issue with Access 2002 and 2003 where Access crashes if you do not have
the foreign key field represented by a text box in the subform.

Whatever field is named in the LinkChildFields property of the subform
control needs to be present as a text box in the subform. That way, thte
LinkChildFields property refers to an object of type Textbox, instead of
an object of type AccessField, and the problem disappears.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"aaj" <aa*@aaj.com> wrote in message
news:1109065085.ab87ad3fd70fc5912934aa7b8bf9790f@t eranews...
Incase its of interest to anyone, (and if anyone knows why I would be
interested in a reason)...

On the parent form (which is bound to a recordset), I had the allow
additions set to false as I would never be adding records from the
parent.

In desperation I set it to true, and it seems to have solved the problem.

thanks again

Andy

"AAJ" <an********@fdtsolutions.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Many thanks

The SP seems to have stopped the crashing, but I'm still having a few
other little odd problems.

Its very strange, it all seems to be linked to the empty recordset and
the listbox, but I can't every remember having this problem before..

thanks for the help, there might well be another post today if I can't
fix the anomolies!!!

cheers

Andy


Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.