472,975 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,975 software developers and data experts.

Empty Listbox crashing Access 2002 SP1

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
6 2429
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Siobhan Perricone | last post by:
I have a user who is having a problem with an access database that I didn't build and haven't had anything to do with in the past. The database opens up to the switchboard, and she clicks through...
1
by: Alan Brasel | last post by:
I have an Access database that I have been using for over a year. My company just replaced my computer with a "New and Improved" computer, and they also installed Access 2002 ( I was using 2000). ...
0
by: LesM | last post by:
This is a change of behaviour between Access 2000 SP3 and Access 2002 SP3. I have Progress table that is linked via ODBC into Access using OpenLink Lite for Progress 9.0b. For over a year, using...
3
by: joe | last post by:
I actually have 2 questions: 1) Is databinding the fastest way to load a listbox from sqlserver? speed is crucial and I want to make sure i'm populating it the fastest way i can 2) Also,...
4
by: Peter Gibbs | last post by:
I need some help with this problem. I'm using Access 2002 with XP. My problem is with a 2-column listbox. My VBA code puts text data into the listbox. The problem is that the text data...
2
by: deluded.soul | last post by:
Hi everyone, I have a database table with first name and last name entries. I am using a ListBox to show these values. Now what I want is that the columns adjust their width automatically...
1
by: aaron | last post by:
Hello folks, Has anyone ever experienced the Access 2002 runtime crashing when the "Compact on Close" option is set for an MDE file? We are currently having this problem on a number of...
18
by: Ljordan2k6 | last post by:
Hi. First post here, so I apologize ahead of time if it isn't the best-formatted post. I am working on a form that has a listbox (named LstCustID) that is bound to an access table (named...
2
by: bplantes | last post by:
Hi All, I am new to Access programming and it has been a long time since I have done any programming at all, so I am a bit rusty. I am building a form in Access 2002 that displays a list of...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.