Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 8th, 2003, 11:05 AM
Registered User
 
Join Date: Nov 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listbox problem

Using Access 2002 the following happens

I created a form, where the data shown (base on a query in the database) relies on the value from a listbox (based on a query from a table). I added the listbox using the wizard, it shows the correct values but I'm not able to select one !! Just nothing happens ! Not clicking it, or using the arrows and enter. Whats wrong here ?

When I do something similar, in fact exactly the same, in Access 97 it does work. I'm able to indeed select one of the listbox-items.
 
Old November 10th, 2003, 09:00 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Please post the listbox's After Update event code so we can get some clues. Thanks.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old November 10th, 2003, 10:37 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am assuming here, but here it goes anyway.

"I created a query a form...based on a query. Is the query updateable? if not, that is your problem. Access 97 may be created with a table, therefore it works.

Am I right? let us know.



Sal
 
Old November 10th, 2003, 04:35 PM
Registered User
 
Join Date: Nov 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think I must make things a bit clearer.

It's not that the result in the form is not what I expected (nothing changes) The problem is, I have a listbox control, which shows values, but when I click one of the values, something is supposed to happen. It doesn't. So it looks like the control is not functioning correctly. The only thing I can do with it is, pulldown, and pullup the list of values.
I changed the "source" of the form from a query from database, query from inside the form, a table, nothing, No result. I changed the source of the listbox, from a query inside the form, Query inside the database. Nothing changes. Same problem.
 
Old November 10th, 2003, 05:04 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

That is why I asked for you to post the listbox's AfterUpdate event code so we can see what you wrote. It could provide us with a good clue to why your listbox is not behaving as expected.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old November 11th, 2003, 01:57 PM
Registered User
 
Join Date: Nov 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There is no After Update Event. (there isnt one in Access 97 either, but that one works.)
You don't need an Event for a Control to work.
 
Old November 11th, 2003, 03:05 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is the query the same query used in 97 and 2002?
When you open the query (not the form) can it be updated?



Sal
 
Old November 12th, 2003, 09:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Quote:
quote:Originally posted by jberk
 There is no After Update Event. (there isnt one in Access 97 either, but that one works.)
You don't need an Event for a Control to work.
Without an AfterUpdate event on the listbox, when you select something the listbox will just sit there and do nothing. There's gotta be some instructions in there if want something to happen after you choose an item off the list.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old November 12th, 2003, 03:45 PM
Registered User
 
Join Date: Nov 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sal,
The Query is same in 97 and 2002. How can I see it's updatable?

Greg,
That is just the problem, I CANNOT select anything. Its not that the selection produces nothing, the Control doesn't work at all.
 
Old November 12th, 2003, 03:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Quote:
quote:Originally posted by jberk
That is just the problem, I CANNOT select anything. Its not that the selection produces nothing, the Control doesn't work at all.
OoooOOooh... it's not that you're clicking on it and nothing happens in the sense of an AfterUpdate. It's that you cannot even click on it! I get it now. (I hope. )

Check three things:
  • Check the listbox's "Locked" property and make sure it's FALSE.
  • Check the listbox's "Enabled" property and make sure it's TRUE.
  • Check the form's "Allow Edits", "Allow Deletions", and "Allow Additions" properties and make sure they all are TRUE.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Listbox Problem Brendan Bartley Access 4 November 26th, 2007 01:34 PM
ListBox problem aliirfan84 ASP.NET 2.0 Professional 5 May 28th, 2007 08:39 AM
ListBox Problem spacy ASP.NET 1.x and 2.0 Application Design 2 October 18th, 2004 05:45 AM
A ListBox problem csc820203 C# 6 June 15th, 2004 06:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.