Combobox + listbox = headache

Rebirth

New member
Local time
Today, 10:20
Joined
Nov 22, 2008
Messages
3
Hi, I am trying to get a listbox to update after I have run a query from a combobox.

The combo box "On Change [Event Procedure] looks like this...

Code:
Private Sub filtercombobox_Change()
    DoCmd.SetWarnings False  
    DoCmd.OpenQuery "qry_typevenue"    
    DoCmd.SetWarnings True   
    Me.filtercombobox = ""
End Sub

"qry_typevenue" is a make-table-query that creates a new table from the filtered query called "tbl_querytype".

The listbox is reading the "tbl_querytype" and this is where I am having problems.

I select a filter from the combo box, I then get a runtime error (3211) which I think is telling me that the listbox is currently reading this particular table, therefor I (access engine) cannot do anything...

Any help?

I am very new to access...
 
I can't remeber what form I came across this webiste but this should help you

http://www.datapigtechnologies.com/flashfiles/combobox2.html

Thanks!

I now use a simple "select query" I followed the video tutorial and found it worked fine using a combobox+listbox. So now I got it filtering the way I wanted it to.

The only problem now is when I select a row in the listbox it would update another field in the form with a primary key in the listbox.

I want to book the current selection.

The PK is actually a foreign key in the booking table. (The query has a few tables)

I'll probably figure it out.

Again thanks, the headache is now lifting :cool:
 
I just had to change the "Bound Column" number to the correct field to get the other field on form (in another table) to update.
 

Users who are viewing this thread

Back
Top Bottom