p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   Listbox problem (http://p2p.wrox.com/showthread.php?t=5930)

jberk November 8th, 2003 11:05 AM

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.

SerranoG November 10th, 2003 09:00 AM

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

sal November 10th, 2003 10:37 AM

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

jberk November 10th, 2003 04:35 PM

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.

SerranoG November 10th, 2003 05:04 PM

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

jberk November 11th, 2003 01:57 PM

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.

sal November 11th, 2003 03:05 PM

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



Sal

SerranoG November 12th, 2003 09:01 AM

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

jberk November 12th, 2003 03:45 PM

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.

SerranoG November 12th, 2003 03:54 PM

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. [:I])

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


All times are GMT -4. The time now is 02:25 PM.

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