Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 30th, 2003, 03:06 PM
hlove hlove is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 6 hlove User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Access: list box/combo box "After Update" problems

Hello,

I am having two problems with a form:

1) I have a list box that is not displaying the results of a select query.

The Row Source Type is Table/Query and the Row Source is my query. When I open the form, the list box is blank. But, when I open the form and run the query manually, I get the values I want displayed in datasheet view. The list box is still blank at this point.

How do I get these results to display in the list box?


2) I would like the list box to re-execute the query after a combo box has been updated.

The combo box contains the unique ID of a record. When I select a record in the combo box, the values in the form change to reflect the associated values for that record.

I want the list box to update as well, but its values are not based on the same table. They are based on a query.

What code should I add to the ComboBox_AfterUpdate() function to get the list box to re-execute its query?

Any help would be appreciated.

Thanks,
Harry

Reply With Quote
  #2  
Old December 30th, 2003, 03:35 PM
hlove hlove is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 6 hlove User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Nevermind, I got it to work. Sorry about that.

Here's what worked:
1) Deleted my list box. Used the list box wizard to add a new list box based on my query. This cleared up the problem. When I looked at the data properties tab for the new list box, I noticed that the Row Source was different from my original. Instead of the name of my query, it used a SELECT statement: "SELECT [Query name].field FROM [Query name];"

Not very intuitive for me, but it works, nonetheless.

2) For the combo box part, I copied the code from the Refresh button's command and inserted it at the end of the code for the ComboBox_AfterUpdate() function. Now, after each combo box selection, the form refreshes, which also happens to refresh the values for the list box.

Oh well, sorry again. Hope that helps somebody else.

Harry

Reply With Quote
  #3  
Old January 2nd, 2004, 01:22 AM
larrywkl larrywkl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 larrywkl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have a database that i want to extract values and insert automatically i.e when i choose for example a book by an author Larry it inserts the price automatically to be 70. Can someone help i am working with MsAccess

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Access: list box/combo box "After Update" problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway