Bookmark Problem

K

Kaur

Hi,
I am having a strange bookmark problem. I have a main form called
frmSurveyQSubQ. This form has a subform called sfrmRespodent.
SfrmRespondent has a sfrm in it called sfrsfrmResponses.
I have a list box on main form called lstQuestion that displays all the
questions relevant to a survey. Clicking on a question in it fills the
second list box "lstSuquestion" with relevant sub questions for
selected question in lstQuestion on main form. The code I am using is

Private Sub lstQuestion_AfterUpdate()

Me![lstSubQuestion].Requery
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[QuestionID] = " & str(Me![lstQuestion])
Me.Bookmark = rs.Bookmark
'Reset the combo box.
Me.lstQuestion = ""
End Sub
From the filled listSubquestion I click on a subquestion that fills the
relevant Respondent in lstRespondent list box for selected subquestion.

Private Sub lstSubQuestion_Click()
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[SubQuestionID] = " & str(Me![lstSubQuestion])
Me.Bookmark = rs.Bookmark
'Reset the combo box.
Me.lstSubQuestion = ""
Me.cmdAddImpact.Enabled = True
End Sub

Every thing is working fine. I select Question "QuestionA", that is
associated with SubQuestion "SubQuesA", SubQuesB" etc. Selecting one of
the selected subquestion shows me the correct Respondent assocaited
with it.

The problem occurs when I select Question "QuestionB" which is also
associated with "SubQuesA", Selecting on SubquesA takes me back to
QuestionA instead of showing me associated Respondent for Question B
and SubQuestA.
In other words if a sub question is associated with more than one
question, selecting on that sub question takes me back to the
associated previously opened question not the current question for
which the sub question is selected for.

No matter how much I try I can not view Respondent associated with
QuestionB and SubQuesA. It keeps on taking me back to Question A and
sub QuestionA.

Any help would be appreciated.

MK
 
K

Kaur

I found the solution. Please ignore this post.
Kaur said:
Hi,
I am having a strange bookmark problem. I have a main form called
frmSurveyQSubQ. This form has a subform called sfrmRespodent.
SfrmRespondent has a sfrm in it called sfrsfrmResponses.
I have a list box on main form called lstQuestion that displays all the
questions relevant to a survey. Clicking on a question in it fills the
second list box "lstSuquestion" with relevant sub questions for
selected question in lstQuestion on main form. The code I am using is

Private Sub lstQuestion_AfterUpdate()

Me![lstSubQuestion].Requery
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[QuestionID] = " & str(Me![lstQuestion])
Me.Bookmark = rs.Bookmark
'Reset the combo box.
Me.lstQuestion = ""
End Sub
From the filled listSubquestion I click on a subquestion that fills the
relevant Respondent in lstRespondent list box for selected subquestion.

Private Sub lstSubQuestion_Click()
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[SubQuestionID] = " & str(Me![lstSubQuestion])
Me.Bookmark = rs.Bookmark
'Reset the combo box.
Me.lstSubQuestion = ""
Me.cmdAddImpact.Enabled = True
End Sub

Every thing is working fine. I select Question "QuestionA", that is
associated with SubQuestion "SubQuesA", SubQuesB" etc. Selecting one of
the selected subquestion shows me the correct Respondent assocaited
with it.

The problem occurs when I select Question "QuestionB" which is also
associated with "SubQuesA", Selecting on SubquesA takes me back to
QuestionA instead of showing me associated Respondent for Question B
and SubQuestA.
In other words if a sub question is associated with more than one
question, selecting on that sub question takes me back to the
associated previously opened question not the current question for
which the sub question is selected for.

No matter how much I try I can not view Respondent associated with
QuestionB and SubQuesA. It keeps on taking me back to Question A and
sub QuestionA.

Any help would be appreciated.

MK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top