Re: Listboxes results based on table joins
- From: "Jeanette Cunningham" <nnn@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Oct 2008 20:58:07 +1100
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: prog
- Re: Listboxes results based on table joins
- From: prog
- Re: Listboxes results based on table joins
- References:
- Listboxes results based on table joins
- From: prog
- Listboxes results based on table joins
- Prev by Date: Listboxes results based on table joins
- Next by Date: Re: Problems with input-validation
- Previous by thread: Listboxes results based on table joins
- Next by thread: Re: Listboxes results based on table joins
- Index(es):
Relevant Pages
|