|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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
|
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Access: list box/combo box "After Update" problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|