Cancelled previous operation error

K

Krista H

Develop Env = Vista/Access2007
Prod Env = XP/Access2003

Backend tables on server and app installed on 5 user machines, tables linked
to tables.

Issue: Product search form, contains 10 searchable fields. SQL string is
built dynamically based on search criteria. Results are populated in a list
field. User can double click on an item in the result list and it will open
another from with the product details, the search form stays open behind the
search form. The whole process works as intended. I recently received an
issue report where a user searched a product based on product number, double
clicked on the item in the result list, the product details form opened,
after looking at it closed the product detail forms; the search form was
still open with the origianl results in the list. The user did another task
in another program on their computer; went back to the search page double
clicked on the same result in the search result list and received the
cancelled previous operation error. I don't have and dlookups in this
particular code and am at a loss on what could cause the problem since it
worked the first time and only randomly fails on the second attempt. The
other issue is that when I try it I have no issue, I am offsite so it is hard
to debug when i canot reproduce the error. I am looking for ideas on how it
is the result list data is becoming corrupt I am assuming that is what is
causing the error.

Here is the code that populates the list box:

Me.lst_Results.RowSource = sqlStr

Here is the double click code:

Private Sub lst_Results_DblClick(Cancel As Integer)
On Error GoTo Handle_Error

Dim stDocName As String, productWrite As Boolean

stDocName = "frm_UpdateProduct"
If CurrentProject.AllForms(stDocName).IsLoaded Then

MsgBox ("You have a product record open and in work. Please save or
cancel before selecting another product.")
'POPUP customer record that is already open
Forms.frm_UpdateProduct.SetFocus

Else

glbProductNo = lst_Results.Column(0)
productWrite = False

DoCmd.OpenForm stDocName, , , , , , productWrite

End If
Exit Sub

Handle_Error:
MsgBox Err.Description
Exit Sub
End Sub
 
K

Krista H

sorry there was an error whem i posted the first time. please post replies on
the first thread and not here.
 

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