Re: Listboxes results based on table joins
- From: prog <prog@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 12 Oct 2008 15:40:00 -0700
Ok. I was able to get that to work. Now I'm running into some issues when I
try to create a third listbox which returns results based on the second one.
"Jeanette Cunningham" wrote:
Hi prog,.
this is similar to creating cascading combo boxes.
Use the after update event of the listbox with questions, to build the row
source for the listbox with answers.
A simple example would be something like this:
Dim strSQL as String
strSQL = "Select AnswerID, AnswerDescr " _
& "From tblAnswer " _
& "Where QuestionID = " & Me.[NameOfQuestionListbox] & " " _
& "Order by AnswerDescr"
Me.[NameOfAnswerListbox].Rowsource = strSQL
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
"prog" <prog@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:20C871B1-7017-4749-9858-5A8DEA65C1D8@xxxxxxxxxxxxxxxx
Hi,
I have two tables. One has a list of questions and the other table lists
answers to those questions. It's a one to many (one question many
answers).
What I'm trying to do is have a list box list all the questions, which I
already have and then based on the question I pick (onclick) a second
listbox
appears showing me specific answers to that question. And I already have
this created via joins between the two tables in the background.
Thanks
- Follow-Ups:
- Re: Listboxes results based on table joins
- From: Jeanette Cunningham
- Re: Listboxes results based on table joins
- References:
- Listboxes results based on table joins
- From: prog
- Re: Listboxes results based on table joins
- From: Jeanette Cunningham
- Listboxes results based on table joins
- Prev by Date: Re: Locking Forms
- Next by Date: tab control page selector tabs not visible when form opens
- Previous by thread: Re: Listboxes results based on table joins
- Next by thread: Re: Listboxes results based on table joins
- Index(es):
Relevant Pages
|