By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,575 Members | 3,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,575 IT Pros & Developers. It's quick & easy.

Bookmark problem

P: n/a
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

Jun 20 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Kaur wrote:
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

I'll toss this out.
Just before each
rs.FindFirst
enter something like
msgbox str(Me![lstSubQuestion]

Maybe the values aren't what you expect, not getting updated.
Next, set some breakpoints in your code. Then follow the bouncing code.
Jun 21 '06 #2

P: n/a
I found the solution. Please ignore this post.
salad wrote:
Kaur wrote:
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

I'll toss this out.
Just before each
rs.FindFirst
enter something like
msgbox str(Me![lstSubQuestion]

Maybe the values aren't what you expect, not getting updated.
Next, set some breakpoints in your code. Then follow the bouncing code.


Jun 21 '06 #3

P: n/a
"Kaur" <ka***@saic.com> wrote
I found the solution. Please ignore this post.


Because newsgroups are for everyone's learning experience, perhaps you would
share with us what you found -- how you solved the problem.

Larry Linson
Microsoft Access MVP
Jun 22 '06 #4

P: n/a
Yes certainly, My problem was the compound key. I was referring to find
records matching the current SubquestionID instead of current
QuestionID and SubQuestionID together. Including SuquestionID solved
the problem.
Larry Linson wrote:
"Kaur" <ka***@saic.com> wrote
> I found the solution. Please ignore this post.


Because newsgroups are for everyone's learning experience, perhaps you would
share with us what you found -- how you solved the problem.

Larry Linson
Microsoft Access MVP


Jun 22 '06 #5

P: n/a
Thanks.

"Kaur" <ka***@saic.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
Yes certainly, My problem was the compound key. I was referring to find
records matching the current SubquestionID instead of current
QuestionID and SubQuestionID together. Including SuquestionID solved
the problem.
Larry Linson wrote:
"Kaur" <ka***@saic.com> wrote
> I found the solution. Please ignore this post.


Because newsgroups are for everyone's learning experience, perhaps you
would
share with us what you found -- how you solved the problem.

Larry Linson
Microsoft Access MVP

Jun 22 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.