Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 8th, 2003, 11:05 AM
Registered User
 
Join Date: Nov 2003
Location: , , Netherlands.
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.
Reply With Quote
  #2 (permalink)  
Old November 10th, 2003, 09:00 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
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
Reply With Quote
  #3 (permalink)  
Old November 10th, 2003, 10:37 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
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
Reply With Quote
  #4 (permalink)  
Old November 10th, 2003, 04:35 PM
Registered User
 
Join Date: Nov 2003
Location: , , Netherlands.
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.
Reply With Quote
  #5 (permalink)  
Old November 10th, 2003, 05:04 PM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
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
Reply With Quote
  #6 (permalink)  
Old November 11th, 2003, 01:57 PM
Registered User
 
Join Date: Nov 2003
Location: , , Netherlands.
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.
Reply With Quote
  #7 (permalink)  
Old November 11th, 2003, 03:05 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
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
Reply With Quote
  #8 (permalink)  
Old November 12th, 2003, 09:01 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
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
Reply With Quote
  #9 (permalink)  
Old November 12th, 2003, 03:45 PM
Registered User
 
Join Date: Nov 2003
Location: , , Netherlands.
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.
Reply With Quote
  #10 (permalink)  
Old November 12th, 2003, 03:54 PM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:26 PM.


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