K
Kurt Monroe
I have a Help-Desk form that displays rows of data (called "problems"). The
users want to double-click on a row (Problem to them) and open the form that
shows the many details of that one specific Problem. I can do that by
opening the EditProblem form this way:
stLinkCriteria = "[Ticket Number] = Me![Ticket Number]
DoCmd.OpenForm stDocName, , , stLinkCriteria
That allows them to see the details of the problem just fine.
But then they wanted to remain in the EditProblem form and be able to
navigate through the Problems that they saw on the first form, while they are
in the EditProblem form, instead of having to close the EditProblem form and
double-click on the next Problem in the first form, which then takes them
back to the EditProblems form.
So, now when they double-click on a row in the first form, I load up a
"SelectedProblems" table with the Key ([Ticket Number]) from the currently
displayed rows, and then I open up the EditProblem form with this:
stLinkCriteria = "[Ticket Number] in (select [ticket number] from
SelectedProblems)"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Then I navigate to the desired ticket with this:
'navigate to the record
Set Frm = Forms(frmNm$)
Set rs = Frm.RecordsetClone
varTicketNumber = Me!Current_ticket
crit$ = "[Ticket Number]= " & varTicketNumber
rs.FindFirst crit$
Frm.Bookmark = rs.Bookmark
Frm.[Ticket Number].SetFocus
Set rs = Nothing
Set Frm = Nothing
But then, sometimes, very intermittently, I can't find a pattern to it,
while in the EditProblem form, they will sometimes get this error:
"update or cancelupdate without Addnew or Edit"
This EditProblem form is very complex with lots of subforms and updating and
adding. I cannnot figure out what to do at this point.
Is there another way to allow navigating through the records in the
EditProblems form?
I don't keep the "calling form" open, I close it whenever they double-click
and open the EditProblem form.
I think the RecordsetClone is giving me this problem. Any suggestions?
Thanks,
users want to double-click on a row (Problem to them) and open the form that
shows the many details of that one specific Problem. I can do that by
opening the EditProblem form this way:
stLinkCriteria = "[Ticket Number] = Me![Ticket Number]
DoCmd.OpenForm stDocName, , , stLinkCriteria
That allows them to see the details of the problem just fine.
But then they wanted to remain in the EditProblem form and be able to
navigate through the Problems that they saw on the first form, while they are
in the EditProblem form, instead of having to close the EditProblem form and
double-click on the next Problem in the first form, which then takes them
back to the EditProblems form.
So, now when they double-click on a row in the first form, I load up a
"SelectedProblems" table with the Key ([Ticket Number]) from the currently
displayed rows, and then I open up the EditProblem form with this:
stLinkCriteria = "[Ticket Number] in (select [ticket number] from
SelectedProblems)"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Then I navigate to the desired ticket with this:
'navigate to the record
Set Frm = Forms(frmNm$)
Set rs = Frm.RecordsetClone
varTicketNumber = Me!Current_ticket
crit$ = "[Ticket Number]= " & varTicketNumber
rs.FindFirst crit$
Frm.Bookmark = rs.Bookmark
Frm.[Ticket Number].SetFocus
Set rs = Nothing
Set Frm = Nothing
But then, sometimes, very intermittently, I can't find a pattern to it,
while in the EditProblem form, they will sometimes get this error:
"update or cancelupdate without Addnew or Edit"
This EditProblem form is very complex with lots of subforms and updating and
adding. I cannnot figure out what to do at this point.
Is there another way to allow navigating through the records in the
EditProblems form?
I don't keep the "calling form" open, I close it whenever they double-click
and open the EditProblem form.
I think the RecordsetClone is giving me this problem. Any suggestions?
Thanks,