Combo box Rowsource

lcook1974

Registered User.
Local time
Today, 00:05
Joined
Dec 21, 2007
Messages
330
Hi!
I have an easy one for you...because I have a brain fark!

I want to have my combox "remove" a question after it has been selected and the user moves to the next question.

I feel it would need to be based on two criterias. AARID is Null AND QID is null.

The two table I have are:
Questions table (20 questions)
Answers Table

Answer table contains the QID and AARID (after action review)

I was thinking it should be like this but I can't get this to work.

Code:
Select * From Questions WHERE Not Exists( Select QID from Answers Where AARID = Me.AARID)


Any links? other threads I should check out?

Larry
 
In you questions table you wil need a flag to be set once the question has been answered. so if I pick Q1 from the combo then provide an answer, as soon as I provide an answer I run a update query to flag the Flag = True where QuestionNo = 1

The rowsource for all subsequent combos would be "select Question.... From Table where flag = False."
 
Wouldn't the QID in the Answer table be that flag? Along with the AARID?

When they choose a question, it automatically places that QID and AARID in the Answer table.
 
Yes it would but from what you said it sounded like you wanted to prevent the user from selecting the same question from the combo more than once.

The method I suggested drops the quesiton from the rowsource after it has been asked.
 
I have multiple users for different area hospitals that "could" be having and AAR at the same. Since the tables are in the back-end they will be using the same questions, so I don't think I can "flag" them because then others wouldn't be able to use them at the same time.

I wrote this...but it isn't working. The questions are a subform linked by the AARID.

Code:
SELECT *
FROM Questions
WHERE Not Exists (SELECT Answers.QID
FROM Answers
WHERE (((Answers.AARID)=[Forms]![frmAAR]![AARID])));

In the AfterUpdate event I put me.requery for the combo box and that didn't help either.



Larry
 

Users who are viewing this thread

Back
Top Bottom