Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Bookmark Problem

Discussion in 'Information Technology' started by Kaur, Jul 28, 2006.

  1. Kaur

    Kaur
    Expand Collapse
    Guest

    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
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Sikhs Face Problems While Carrying Kirpans In Khyber-Pakhtunkhwa - SikhSiyasat.Net Breaking News Jul 29, 2016
    "Dasam" Granth - A Look At The Core Problems Dasam Granth Oct 21, 2015
    Problems In Life Sikh Sikhi Sikhism Apr 13, 2015
    How can I make decent and useful friends and from where ?? most people have a problem with me Sikh Youth Oct 23, 2013
    The Problem with Taking Too Many Vitamins Health & Nutrition Oct 18, 2013

  3. Kaur

    Kaur
    Expand Collapse
    Guest

    I found the solution. Please ignore this post.
    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
     

Share This Page